belliottsmith commented on code in PR #233: URL: https://github.com/apache/cassandra-accord/pull/233#discussion_r2247957983
########## accord-core/src/main/java/accord/impl/InMemoryCommandStore.java: ########## @@ -420,30 +429,32 @@ protected final InMemorySafeStore createSafeStore(PreLoadContext context, Ranges Map<RoutableKey, InMemorySafeCommandsForKey> commandsForKey = new HashMap<>(); context.forEachId(txnId -> commands.put(txnId, lazyReference(txnId))); - - for (Unseekable unseekable : context.keys()) + if (context.loadKeys() != NONE) { - switch (unseekable.domain()) + Unseekables unseekables = context.keys(); + if (unseekables.domain() == Key) { - case Key: - RoutableKey key = (RoutableKey) unseekable; - switch (context.loadKeys()) - { - case NONE: - continue; - case INCR: - case SYNC: - case ASYNC: - commandsForKey.put(key, commandsForKey((RoutingKey) key).createSafeReference()); - break; - default: throw new UnsupportedOperationException("Unknown key history: " + context.loadKeys()); - } - break; - case Range: - // load range cfks here - break; + for (RoutingKey key : (AbstractUnseekableKeys)unseekables) + commandsForKey.put(key, commandsForKey(key).createSafeReference()); + } + else + { + CommandSummaries.SummaryLoader loader = CommandSummaries.SummaryLoader.loader(unsafeGetRedundantBefore(), unsafeGetMaxDecidedRX(), context); + for (GlobalCommandsForKey global : this.commandsForKey.values()) Review Comment: This doesn't really need to be a range multi map, we can already search it just fine if we want to by iterating over the keys and then slicing to a subMap - we do it elsewhere, just wasn't super important here. Happy to do it now if you like. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org