You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "bdeggleston (via GitHub)" <gi...@apache.org> on 2024/06/14 22:30:47 UTC
[PR] C19288 accord async reads are unsafe [cassandra-accord]
bdeggleston opened a new pull request, #98:
URL: https://github.com/apache/cassandra-accord/pull/98
(no comment)
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] C19288 accord async reads are unsafe [cassandra-accord]
Posted by "dcapwell (via GitHub)" <gi...@apache.org>.
dcapwell commented on code in PR #98:
URL: https://github.com/apache/cassandra-accord/pull/98#discussion_r1640592222
##########
accord-core/src/main/java/accord/messages/ReadData.java:
##########
@@ -359,11 +359,13 @@ void cancel(@Nullable SafeCommandStore safeStore)
if (safeCommand != null) safeCommand.removeListener(this);
waitingOn.clear(safeStore.commandStore().id());
}
+
// TODO (expected): efficient unsubscribe mechanism
- node.commandStores().mapReduceConsume(this, waitingOn.stream(), forEach(in -> {
- SafeCommand safeCommand = in.ifInitialised(txnId);
- if (safeCommand != null) safeCommand.removeListener(this);
- }, node.agent()));
+ if (waitingOn != null)
Review Comment:
did you hit a NPE? since we touch `waitingOn.stream()` we would hit a NPE.
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] C19288 accord async reads are unsafe [cassandra-accord]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith closed pull request #98: C19288 accord async reads are unsafe
URL: https://github.com/apache/cassandra-accord/pull/98
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] C19288 accord async reads are unsafe [cassandra-accord]
Posted by "bdeggleston (via GitHub)" <gi...@apache.org>.
bdeggleston commented on PR #98:
URL: https://github.com/apache/cassandra-accord/pull/98#issuecomment-2173986887
I think that async reads are safe by virtue of the execution process, but the assertion was assuming they were synchronous. Was there another issue with ephemeral reads? I'm less familiar with them, but it seems like it would be ok for an ephemeral read to read the from "future", so long as they don't go backwards in time
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] C19288 accord async reads are unsafe [cassandra-accord]
Posted by "bdeggleston (via GitHub)" <gi...@apache.org>.
bdeggleston commented on code in PR #98:
URL: https://github.com/apache/cassandra-accord/pull/98#discussion_r1643166565
##########
accord-core/src/main/java/accord/messages/ReadData.java:
##########
@@ -359,11 +359,13 @@ void cancel(@Nullable SafeCommandStore safeStore)
if (safeCommand != null) safeCommand.removeListener(this);
waitingOn.clear(safeStore.commandStore().id());
}
+
// TODO (expected): efficient unsubscribe mechanism
- node.commandStores().mapReduceConsume(this, waitingOn.stream(), forEach(in -> {
- SafeCommand safeCommand = in.ifInitialised(txnId);
- if (safeCommand != null) safeCommand.removeListener(this);
- }, node.agent()));
+ if (waitingOn != null)
Review Comment:
yes, if there are multiple calls to cancel it will throw an NPE
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] C19288 accord async reads are unsafe [cassandra-accord]
Posted by "dcapwell (via GitHub)" <gi...@apache.org>.
dcapwell commented on PR #98:
URL: https://github.com/apache/cassandra-accord/pull/98#issuecomment-2173990369
We disable Ephemeral Reads in C* as they don't work (let alone a single cache evict will cause chaos), so thats fine by me.
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org