Skip to content

Commit

Permalink
Add assert for codec version
Browse files Browse the repository at this point in the history
Signed-off-by: Sooraj Sinha <soosinha@amazon.com>
  • Loading branch information
soosinha committed Aug 28, 2024
1 parent 358f492 commit 6a05b5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ assert getLocalNode().equals(clusterState.getNodes().get(getLocalNode().getId())
coordinationState.get().isRemotePublicationEnabled(),
persistedStateRegistry
);
logger.info("initialized publicationcontext using class: {}", publicationContext.getClass().toString());
logger.debug("initialized PublicationContext using class: {}", publicationContext.getClass().toString());

final PublishRequest publishRequest = coordinationState.get().handleClientValue(clusterState);
final CoordinatorPublication publication = new CoordinatorPublication(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,7 @@ public PublicationContext newPublicationContext(
}

private boolean validateRemotePublicationOnAllNodes(DiscoveryNodes discoveryNodes) {
if (ClusterMetadataManifest.getCodecForVersion(discoveryNodes.getMinNodeVersion()) < ClusterMetadataManifest.CODEC_V0) {
return false;
}
assert ClusterMetadataManifest.getCodecForVersion(discoveryNodes.getMinNodeVersion()) >= ClusterMetadataManifest.CODEC_V0;
for (DiscoveryNode node : discoveryNodes.getNodes().values()) {
// if a node is non-remote then created local publication context
if (node.isRemoteStatePublicationEnabled() == false) {
Expand Down

0 comments on commit 6a05b5a

Please sign in to comment.