-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Replay nondurable #4264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Replay nondurable #4264
Conversation
c6ba404
to
831de21
Compare
|
||
public class AccordDataStore implements DataStore | ||
{ | ||
private static final Logger logger = LoggerFactory.getLogger(AccordDataStore.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you briefly document durability semantics here? In other words, the fact that sync point is executed after we have flushed meltable?
@@ -78,35 +68,42 @@ public boolean hasTasks() | |||
return tasks + executor.getActiveTaskCount() + executor.getPendingTaskCount() > 0; | |||
} | |||
|
|||
@Override | |||
void preUnlockCaches() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe "before" instead of "pre"?
@@ -492,6 +492,8 @@ void initParent() | |||
@Override | |||
public void close() | |||
{ | |||
// TODO (required): validate this in IntervalBTreeTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫡
public static class UniqueSave | ||
{ | ||
@Nullable List<Runnable> onSuccess; | ||
void onSuccess(Runnable onSuccess) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like onSuccess can be called from multiple threads (via shared executor submission), should we use volatile and some concurrent structure here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all done under mutual exclusion while holding the executor lock.
|
||
T listener; | ||
if (null == (listener = (T)onFlush.get(key))) | ||
onFlush = ImmutableMap.<Object, Consumer<TableMetadata>>builder().putAll(onFlush).put(key, listener = factory.get()).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind if we not used assignments inside statements (it is just so easy to miss them), and did something like this:
T listener = (T) onFlush.get(key);
if (listener == null)
{
listener = factory.get();
onFlush = ImmutableMap.<Object, Consumer<TableMetadata>>builder()
.putAll(onFlush)
.put(key, listener)
.build();
}
return listener;
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20765
Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20767
65268f2
to
02793b7
Compare
…tore and data store Also fix: - Limit truncation to TruncatedApplyWithOutcome until data is persisted durably to local store - IntervalUpdater not invoking super.close() - Do not invoke preRunExclusive without holding lock - IntervalUpdater not correctly initialise BranchBuilder.inUse - AccordExecutor should notify if more work on unlock of caches - Relax paranoid CFK validation during restart Also improve: - Flush logs before System.exit - Start/stop progress log explicitly - Limit progress log concurrency - Clear heavy fields in some messages once processed patch by Benedict; reviewed by Alex Petrov for CASSANDRA-20780
02793b7
to
0b80935
Compare
df3eb40
to
54e39a9
Compare
Thanks for sending a pull request! Here are some tips if you're new here:
Commit messages should follow the following format:
The Cassandra Jira