Skip to content

Commit dcd723a

Browse files
authored
Enable BWC tests after backport of #58029 (#58815)
1 parent 38aa474 commit dcd723a

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ tasks.register("verifyVersions") {
174174
* after the backport of the backcompat code is complete.
175175
*/
176176

177-
boolean bwc_tests_enabled = false
178-
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/58029" /* place a PR link here when committing bwc changes */
177+
boolean bwc_tests_enabled = true
178+
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
179179
if (bwc_tests_enabled == false) {
180180
if (bwc_tests_disabled_issue.isEmpty()) {
181181
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")

server/src/main/java/org/elasticsearch/cluster/InternalClusterInfoService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public void onFailure(Exception e) {
321321
}
322322
});
323323

324-
final CountDownLatch indicesLatch = updateIndicesStats(new ActionListener<>() {
324+
final CountDownLatch indicesLatch = updateIndicesStats(new ActionListener<IndicesStatsResponse>() {
325325
@Override
326326
public void onResponse(IndicesStatsResponse indicesStatsResponse) {
327327
final ShardStats[] stats = indicesStatsResponse.getShards();

server/src/main/java/org/elasticsearch/index/store/StoreStats.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class StoreStats implements Writeable, ToXContentFragment {
3737
*/
3838
public static final long UNKNOWN_RESERVED_BYTES = -1L;
3939

40-
public static final Version RESERVED_BYTES_VERSION = Version.V_8_0_0;
40+
public static final Version RESERVED_BYTES_VERSION = Version.V_7_9_0;
4141

4242
private long sizeInBytes;
4343
private long reservedSize;

server/src/main/java/org/elasticsearch/indices/recovery/RecoveryState.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.elasticsearch.common.xcontent.XContentFactory;
3737
import org.elasticsearch.index.shard.IndexShard;
3838
import org.elasticsearch.index.shard.ShardId;
39+
import org.elasticsearch.index.store.StoreStats;
3940

4041
import java.io.IOException;
4142
import java.util.HashMap;
@@ -717,7 +718,7 @@ public Index(StreamInput in) throws IOException {
717718
File file = new File(in);
718719
fileDetails.put(file.name, file);
719720
}
720-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
721+
if (in.getVersion().onOrAfter(StoreStats.RESERVED_BYTES_VERSION)) {
721722
fileDetailsComplete = in.readBoolean();
722723
} else {
723724
// This flag is used by disk-based allocation to decide whether the remaining bytes measurement is accurate or not; if not
@@ -738,7 +739,7 @@ public synchronized void writeTo(StreamOutput out) throws IOException {
738739
for (File file : files) {
739740
file.writeTo(out);
740741
}
741-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
742+
if (out.getVersion().onOrAfter(StoreStats.RESERVED_BYTES_VERSION)) {
742743
out.writeBoolean(fileDetailsComplete);
743744
}
744745
out.writeLong(sourceThrottlingInNanos);

0 commit comments

Comments
 (0)