dcapwell commented on code in PR #50:
URL: https://github.com/apache/cassandra-accord/pull/50#discussion_r1281029200
##########
accord-core/src/main/java/accord/local/CommandStores.java:
##########
@@ -87,44 +88,30 @@ private static class StoreSupplier
this.shardFactory = shardFactory;
}
- CommandStore create(int id, RangesForEpochHolder rangesForEpoch)
+ CommandStore create(int id, EpochUpdateHolder rangesForEpoch)
{
return shardFactory.create(id, time, agent, this.store,
progressLogFactory, rangesForEpoch);
}
}
- public static class RangesForEpochHolder
- {
- // no need for safe publication; RangesForEpoch members are final, and
will be guarded by other synchronization actions
- protected RangesForEpoch current;
-
- /**
- * This is updated asynchronously, so should only be fetched between
executing tasks;
- * otherwise the contents may differ between invocations for the same
task.
- * @return the current RangesForEpoch
- */
- public RangesForEpoch get() { return current; }
- }
-
static class ShardHolder
{
final CommandStore store;
- final RangesForEpochHolder ranges;
+ RangesForEpoch ranges;
Review Comment:
> The concern is that the values may not be current not that they will be
invalid
I don't think this is a regression as it moves the mutation from
`RangesForEpochHolder` to `ShardHolder` and keeps the same access pattern...
since everything is `final` the read concern is only for stale data.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]