The WT_DHANDLE_DISCARD flag is used to close the dhandle once as part of the dhandle release. This flag is used in rollback to stable code flow to close the handles that are processed as part of the rollback to stable. But this flag is never assigned to the opened dhandle due to which we never close any of the dhandles that are opened as part of the rollback to stable.
Also, we cannot close a dhandle that is modified as part of the rollback to stable until the checkpoint is successfully finished. Closing a dhandle without a checkpoint can lead to failure when it is actually closed.
Remove the use of the WT_DHANDLE_DISCARD flag in rollback to stable code as it is not used and not required in rollback to stable.