dcapwell commented on code in PR #3656: URL: https://github.com/apache/cassandra/pull/3656#discussion_r1828423698
########## src/java/org/apache/cassandra/service/accord/AccordService.java: ########## @@ -1216,7 +1260,19 @@ private static CommandStoreTxnBlockedGraph.TxnState populate(CommandStoreTxnBloc @Override public Long minEpoch(Collection<TokenRange> ranges) { - return node.topology().minEpoch(); + // When Accord is enabled all epochs are tracked, even when no tables have accord enabled, this causes the min + // epoch to include epochs that do not matter for startup, yet startup needs to ask TCM for them. To lower the + // startup cost, filter out the earlier epochs that are empty so the min epoch returned is the first with ranges + TopologyManager tm = node.topology(); + long maxEpoch = tm.current().epoch(); + long minEpoch = tm.minEpoch(); + while (tm.globalForEpoch(minEpoch).isEmpty()) Review Comment: > 6) when learning about min epochs needed for startup, purge all starting epochs that are empty as it isn’t needed and only adds costs for startup when the cluster is up, accord is enabled, and 0 tables allow accord... we keep growing the list of epochs we are tracking, so lets say 200 epochs later we finally enable accord... we then request new nodes to load those 200 epochs (which is really likely to see range read timeout issues) -- 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