Skip to content

Commit 4156d9f

Browse files
committed
responset to pr comments
1 parent c982a81 commit 4156d9f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

server/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,6 @@ public ClusterState execute(BatchExecutionContext<StartedShardUpdateTask> batchE
734734
indexMetadata.getNumberOfShards(),
735735
startedShardEntry.timestampRange
736736
);
737-
/*
738-
* Only track 'event.ingested' range this if the cluster state min transport version is on/after the version
739-
* where we added 'event.ingested'. If we don't do that, we will have different cluster states on different
740-
* nodes because we can't send this data over the wire to older nodes.
741-
*/
742737
IndexLongFieldRange newEventIngestedMillisRange = currentEventIngestedMillisRange.extendWithShardRange(
743738
startedShardEntry.shardId.id(),
744739
indexMetadata.getNumberOfShards(),

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authc/AuthenticationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.elasticsearch.xpack.core.security.authc.service.ServiceAccountSettings;
3030
import org.elasticsearch.xpack.core.security.authc.support.AuthenticationContextSerializer;
3131
import org.elasticsearch.xpack.core.security.authz.RoleDescriptorsIntersection;
32+
import org.elasticsearch.xpack.core.security.authz.permission.RemoteClusterPermissions;
3233
import org.elasticsearch.xpack.core.security.user.AnonymousUser;
3334
import org.elasticsearch.xpack.core.security.user.User;
3435
import org.hamcrest.Matchers;
@@ -1104,7 +1105,7 @@ public void testMaybeRewriteMetadataForApiKeyRoleDescriptorsWithRemoteClusterRem
11041105
.build();
11051106

11061107
// pick a version that will only remove one of the two privileges
1107-
final TransportVersion olderVersion = TransportVersion.fromId(8772001);
1108+
final TransportVersion olderVersion = RemoteClusterPermissions.MANAGE_ROLES_PRIVILEGE;
11081109

11091110
Map<String, Object> rewrittenMetadata = with2privs.maybeRewriteForOlderVersion(olderVersion).getEffectiveSubject().getMetadata();
11101111
assertThat(rewrittenMetadata.keySet(), equalTo(with2privs.getAuthenticatingSubject().getMetadata().keySet()));

0 commit comments

Comments
 (0)