Skip to content

Commit

Permalink
Review feedback part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-miezal committed Nov 18, 2024
1 parent 95235de commit 7d66dc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,8 @@ public static void convertToNodesFilesIfNecessary()
{
try
{
if (Nodes.local().localInfoWasPresent())
{
return;
}

new LegacySystemKeyspaceToNodes(Nodes.nodes()).convertToNodesFiles();
if (!Nodes.local().localInfoWasPresent())
new LegacySystemKeyspaceToNodes(Nodes.nodes()).convertToNodesFiles();
}
catch (Exception e)
{
Expand All @@ -109,6 +105,7 @@ public LegacySystemKeyspaceToNodes(Nodes nodes)
@VisibleForTesting
void convertToNodesFiles()
{
assert ! isRunning.get();
isRunning.set(true);
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ public static boolean canBeMapped(String keyspace, String table)
if (keyspace.equals(SchemaConstants.SYSTEM_KEYSPACE_NAME))
{
if (table.equals(LOCAL) || table.equals(LEGACY_PEERS))
{
return !LegacySystemKeyspaceToNodes.isRunning();
}
return ALL_TABLES.contains(table);
}
return false;
Expand Down

0 comments on commit 7d66dc1

Please sign in to comment.