From 1d0930fa0bdf25a16a6a55a85c9053e36ed460aa Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 26 Jun 2019 16:51:13 +0100 Subject: [PATCH] Add missing GCP update (#43632) --- .../java/org/elasticsearch/index/shard/IndexShardTests.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java index 1a2e53628de61..bacf36f955c44 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java @@ -3557,6 +3557,9 @@ public void testSegmentMemoryTrackedInBreaker() throws Exception { // In order to instruct the merge policy not to keep a fully deleted segment, // we need to flush and make that commit safe so that the SoftDeletesPolicy can drop everything. if (IndexSettings.INDEX_SOFT_DELETES_SETTING.get(settings)) { + primary.updateGlobalCheckpointForShard( + primary.routingEntry().allocationId().getId(), + primary.getLastSyncedGlobalCheckpoint()); primary.advancePeerRecoveryRetentionLeasesToGlobalCheckpoints(); primary.sync(); flushShard(primary);