Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ tasks.register("verifyVersions") {
* after the backport of the backcompat code is complete.
*/

boolean bwc_tests_enabled = false
boolean bwc_tests_enabled = true
// place a PR link here when committing bwc changes:
String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/72931"
String bwc_tests_disabled_issue = ""
/*
* FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
* JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable
Expand Down
11 changes: 2 additions & 9 deletions server/src/main/java/org/elasticsearch/tasks/TaskInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

package org.elasticsearch.tasks;

import org.elasticsearch.Version;
import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.bytes.BytesReference;
Expand Down Expand Up @@ -104,11 +103,7 @@ public TaskInfo(StreamInput in) throws IOException {
startTime = in.readLong();
runningTimeNanos = in.readLong();
cancellable = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
cancelled = in.readBoolean();
} else {
cancelled = false; // older versions do not report when tasks are cancelled so we just assume they aren't
}
cancelled = in.readBoolean();
assert cancellable || cancelled == false : "uncancellable task cannot be cancelled";
parentTaskId = TaskId.readFromStream(in);
headers = in.readMap(StreamInput::readString, StreamInput::readString);
Expand All @@ -124,9 +119,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeLong(startTime);
out.writeLong(runningTimeNanos);
out.writeBoolean(cancellable);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
out.writeBoolean(cancelled);
} // older versions do not report when tasks are cancelled anyway so it's ok just to drop this flag
out.writeBoolean(cancelled);
parentTaskId.writeTo(out);
out.writeMap(headers, StreamOutput::writeString, StreamOutput::writeString);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ public void testToXContent() throws IOException {
+ ","
+ "\"cancellable\":"
+ executingPolicy.getTaskInfo().isCancellable()
+ (executingPolicy.getTaskInfo().isCancellable()
? ",\"cancelled\":" + executingPolicy.getTaskInfo().isCancellable()
: "")
+ (executingPolicy.getTaskInfo().isCancellable() ? ",\"cancelled\":" + executingPolicy.getTaskInfo().isCancelled() : "")
+ ","
+ header.map(entry -> String.format(Locale.ROOT, "\"headers\":{\"%s\":\"%s\"}", entry.getKey(), entry.getValue()))
.orElse("\"headers\":{}")
Expand Down