Add request version asserting during replica operation (#23167)
This commit is contained in:
parent
a7a3729596
commit
e178dc5493
|
@ -369,6 +369,9 @@ public class TransportShardBulkAction extends TransportWriteAction<BulkShardRequ
|
|||
BulkItemRequest item = request.items()[i];
|
||||
if (item.isIgnoreOnReplica() == false) {
|
||||
DocWriteRequest docWriteRequest = item.request();
|
||||
// ensure request version is updated for replica operation during request execution in the primary
|
||||
assert docWriteRequest.versionType() == docWriteRequest.versionType().versionTypeForReplicationAndRecovery()
|
||||
: "unexpected version in replica " + docWriteRequest.version();
|
||||
final Engine.Result operationResult;
|
||||
try {
|
||||
switch (docWriteRequest.opType()) {
|
||||
|
|
Loading…
Reference in New Issue