SERVER-138253ClosedFixed

[POA] Validate may run mid batch

Classic oplog application has the [following locks|https://github.com/mongodb/mongo/blob/d846616dd9b6551f7fb7d0e3741afbc16f368aed/src/mongo/db/repl/oplog_applier_impl.cpp#L446-L450] to prevent fsync and validate from running mid batch: Does POA needs the same? *This ticket is to handle VALIDATE only*. See SERVER-139205 for fsync. Solution idea: Each time a batch is dispatched, POA takes the validation lock in MODE_IX. The lock is stashed with the rest of the in-flight batch's metadat

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc0
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.