Skip to content

Commit

Permalink
update IngestStats version guards to 7.6
Browse files Browse the repository at this point in the history
after backporting elastic#48485 in elastic#48661, version guards in master can
be updated from 8.0 to 7.6 for IngestStats serialization guards
  • Loading branch information
talevy committed Oct 31, 2019
1 parent 30280f6 commit 4ea667d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.elasticsearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.discovery.DiscoveryModule;
import org.elasticsearch.ingest.IngestStats;
import org.elasticsearch.monitor.fs.FsInfo;
import org.elasticsearch.monitor.jvm.JvmInfo;
import org.elasticsearch.plugins.PluginInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public IngestStats(StreamInput in) throws IOException {
for (int j = 0; j < processorsSize; j++) {
String processorName = in.readString();
String processorType = null;
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_6_0)) {
processorType = in.readString();
}
Stats processorStat = new Stats(in);
Expand All @@ -93,7 +93,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(processorStatsForPipeline.size());
for (ProcessorStat processorStat : processorStatsForPipeline) {
out.writeString(processorStat.getName());
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_6_0)) {
out.writeString(processorStat.getType());
}
processorStat.getStats().writeTo(out);
Expand Down

0 comments on commit 4ea667d

Please sign in to comment.