Skip to content

Commit 71dae7c

Browse files
committed
Apply review comments
1 parent d1897e8 commit 71dae7c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/TransformFeatureSetUsage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class TransformFeatureSetUsage extends Usage {
3333
public TransformFeatureSetUsage(StreamInput in) throws IOException {
3434
super(in);
3535
this.transformCountByState = in.readMap(StreamInput::readString, StreamInput::readLong);
36-
if (in.getVersion().onOrAfter(Version.CURRENT)) { // TODO: V_7_13_0
36+
if (in.getVersion().onOrAfter(Version.V_8_0_0)) { // TODO: V_7_13_0
3737
this.transformCountByFeature = in.readMap(StreamInput::readString, StreamInput::readLong);
3838
} else {
3939
this.transformCountByFeature = Collections.emptyMap();
@@ -59,7 +59,7 @@ public Version getMinimalSupportedVersion() {
5959
public void writeTo(StreamOutput out) throws IOException {
6060
super.writeTo(out);
6161
out.writeMap(transformCountByState, StreamOutput::writeString, StreamOutput::writeLong);
62-
if (out.getVersion().onOrAfter(Version.CURRENT)) { // TODO: V_7_13_0
62+
if (out.getVersion().onOrAfter(Version.V_8_0_0)) { // TODO: V_7_13_0
6363
out.writeMap(transformCountByFeature, StreamOutput::writeString, StreamOutput::writeLong);
6464
}
6565
accumulatedStats.writeTo(out);

x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/TransformUsageTransportAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ protected void masterOperation(
129129
}
130130
long totalTransforms = transformCountSuccess.getHits().getTotalHits().value;
131131
if (totalTransforms == 0) {
132-
transformsCountByFeature.set(Collections.emptyMap());
133-
var usage =
134-
new TransformFeatureSetUsage(transformsCountByState, transformsCountByFeature.get(), new TransformIndexerStats());
132+
var usage = new TransformFeatureSetUsage(transformsCountByState, Collections.emptyMap(), new TransformIndexerStats());
135133
listener.onResponse(new XPackUsageFeatureResponse(usage));
136134
return;
137135
}

0 commit comments

Comments
 (0)