diff options
author | Simon Gratzer <simon.gratzer@mongodb.com> | 2021-05-11 16:51:47 +0200 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-01 14:40:56 +0000 |
commit | c58adbce4f628f0da863bd779ada0512e5b242ec (patch) | |
tree | 029481487cbb315fd35de4eafeb62ae4c885df6c /src/mongo/db/s/shard_filtering_metadata_refresh.cpp | |
parent | eb43e20229bdb20abdcaca1d89b965a22ac44584 (diff) | |
download | mongo-c58adbce4f628f0da863bd779ada0512e5b242ec.tar.gz |
SERVER-48653 Return updated ShardVersion in _configsvrCommitChunkSplit to avoid blind metadata refresh (BACKPORT-9049)v4.2.12
Diffstat (limited to 'src/mongo/db/s/shard_filtering_metadata_refresh.cpp')
-rw-r--r-- | src/mongo/db/s/shard_filtering_metadata_refresh.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp index 2d8b2359378..49f5b486afa 100644 --- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp +++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp @@ -82,8 +82,7 @@ void onShardVersionMismatch(OperationContext* opCtx, }(); if (currentShardVersion) { - if (currentShardVersion->epoch() == shardVersionReceived.epoch() && - currentShardVersion->majorVersion() >= shardVersionReceived.majorVersion()) { + if (shardVersionReceived.isOlderThan(*currentShardVersion)) { // Don't need to remotely reload if we're in the same epoch and the requested version is // smaller than the one we know about. This means that the remote side is behind. return; |