You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "belliottsmith (via GitHub)" <gi...@apache.org> on 2024/08/22 20:13:14 UTC
[PR] Refine ProgressLog [cassandra]
belliottsmith opened a new pull request, #3490:
URL: https://github.com/apache/cassandra/pull/3490
Thanks for sending a pull request! Here are some tips if you're new here:
* Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
* Be sure to keep the PR description updated to reflect all changes.
* Write your PR title to summarize what this PR proposes.
* If possible, provide a concise example to reproduce the issue for a faster review.
* Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
* If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
Commit messages should follow the following format:
```
<One sentence description, usually Jira title or CHANGES.txt summary>
<Optional lengthier description (context on patch)>
patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>
```
The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/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-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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1756754925
##########
src/java/org/apache/cassandra/service/accord/interop/AccordInteropApply.java:
##########
@@ -248,20 +245,14 @@ public void onChange(SafeCommandStore safeStore, SafeCommand safeCommand)
case PreCommitted:
case Committed:
case PreApplied:
- return;
+ return true;
case Applied:
case Invalidated:
case Truncated:
}
- if (safeCommand.removeListener(this))
- ack();
- }
-
- @Override
- public PreLoadContext listenerPreLoadContext(TxnId caller)
- {
- return PreLoadContext.contextFor(txnId);
+ ack();
Review Comment:
We return `false` here, so the listener should be deregistered immediately and not invoked again. This is different to `ReadData`, which stays registered to be notified of being superseded (e.g. if the result is `Applied` before we finish, so that our read is now potentially invalid)
--
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] Refine ProgressLog [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1759215206
##########
src/java/org/apache/cassandra/service/accord/AccordService.java:
##########
@@ -149,6 +149,7 @@ public class AccordService implements IAccordService, Shutdownable
private enum State { INIT, STARTED, SHUTDOWN}
+ // TODO (required): these are unused?
Review Comment:
I don't think they are? We keep metrics for client requests in `ClientRequestMetricsHolder`?
--
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] Refine ProgressLog [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1746059013
##########
src/java/org/apache/cassandra/service/accord/AccordService.java:
##########
@@ -149,6 +149,7 @@ public class AccordService implements IAccordService, Shutdownable
private enum State { INIT, STARTED, SHUTDOWN}
+ // TODO (required): these are unused?
Review Comment:
Yeah these should be removed.
##########
src/java/org/apache/cassandra/service/accord/AccordMessageSink.java:
##########
@@ -122,8 +122,8 @@ private VerbMapping()
builder.put(MessageType.ACCEPT_REQ, Verb.ACCORD_ACCEPT_REQ);
builder.put(MessageType.ACCEPT_RSP, Verb.ACCORD_ACCEPT_RSP);
builder.put(MessageType.ACCEPT_INVALIDATE_REQ, Verb.ACCORD_ACCEPT_INVALIDATE_REQ);
- builder.put(MessageType.GET_DEPS_REQ, Verb.ACCORD_GET_DEPS_REQ);
- builder.put(MessageType.GET_DEPS_RSP, Verb.ACCORD_GET_DEPS_RSP);
+ builder.put(MessageType.CALCULATE_DEPS_REQ, Verb.ACCORD_GET_DEPS_REQ);
+ builder.put(MessageType.CALCULATE_DEPS_RSP, Verb.ACCORD_GET_DEPS_RSP);
Review Comment:
Any reason the verb doesn't get renamed?
##########
src/java/org/apache/cassandra/service/accord/SavedCommand.java:
##########
@@ -69,8 +68,7 @@ private enum HasFields
PARTIAL_DEPS,
ADDITIONAL_KEYS,
WAITING_ON,
- WRITES,
- LISTENERS
+ WRITES
Review Comment:
With durable listeners being removed what is the plan? Listeners only in memory?
##########
src/java/org/apache/cassandra/service/accord/AccordKeyspace.java:
##########
@@ -623,11 +620,11 @@ public Row withoutRedundantCommands(PartitionKey key, Row row, RedundantBefore.E
if (current == null)
return null;
- CommandsForKey updated = current.withRedundantBeforeAtLeast(redundantBefore);
+ CommandsForKey updated = current.withRedundantBeforeAtLeast(redundantBefore.shardRedundantBefore());
if (current == updated)
return row;
- if (updated.size() == 0)
+ if (updated.size() == 0 && updated.prunedBefore() == CommandsForKey.NO_INFO)
Review Comment:
Add a comment explaining when `prunedBefore` is `NO_INFO` and `CFK` is empty.
##########
src/java/org/apache/cassandra/service/accord/api/AccordAgent.java:
##########
@@ -147,4 +162,68 @@ public EventsListener metricsEventsListener()
{
return AccordMetrics.Listener.instance;
}
+
+ @Override
+ public long replyTimeout(ReplyContext replyContext, TimeUnit units)
+ {
+ return Math.max(1, units.convert(((ResponseContext)replyContext).expiresAtNanos() - Clock.Global.nanoTime(), NANOSECONDS));
+ }
+
+ @Override
+ public long attemptCoordinationDelay(Node node, SafeCommandStore safeStore, TxnId txnId, TimeUnit units)
Review Comment:
This logic has something specific it's trying to arrange in terms of having shards not attempt at the same time and there should be a unit test confirming it does that.
##########
src/java/org/apache/cassandra/service/accord/serializers/CommandsForKeySerializer.java:
##########
@@ -350,6 +354,8 @@ public static ByteBuffer toBytesWithoutKey(CommandsForKey cfk)
VIntCoding.writeUnsignedVInt(prevEpoch, out);
VIntCoding.writeUnsignedVInt(prevHlc, out);
+ VIntCoding.writeUnsignedVInt32(cfk.redundantBefore().flags(), out);
Review Comment:
Why not serialize the entire `redundantBefore` `txnId` since `prevEpoch` and `prevHlc` are all part of it?
##########
src/java/org/apache/cassandra/service/accord/AccordStateCache.java:
##########
@@ -525,6 +518,15 @@ public AccordCachingState<K, V> getUnsafe(K key)
return (AccordCachingState<K, V>) cache.get(key);
}
+ public V getValueUnsafe(K key)
Review Comment:
Unused?
##########
src/java/org/apache/cassandra/service/accord/serializers/AwaitSerializer.java:
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.service.accord.serializers;
+
+import java.io.IOException;
+
+import accord.api.ProgressLog.BlockedUntil;
+import accord.local.SaveStatus;
+import accord.messages.Await;
+import accord.messages.Await.AsyncAwaitComplete;
+import accord.messages.Await.AwaitOk;
+import accord.primitives.Participants;
+import accord.primitives.Route;
+import accord.primitives.TxnId;
+import accord.utils.Invariants;
+import org.apache.cassandra.db.TypeSizes;
+import org.apache.cassandra.io.IVersionedSerializer;
+import org.apache.cassandra.io.util.DataInputPlus;
+import org.apache.cassandra.io.util.DataOutputPlus;
+import org.apache.cassandra.utils.vint.VIntCoding;
+
+public class AwaitSerializer
+{
+ public static final IVersionedSerializer<Await> request = new IVersionedSerializer<>()
+ {
+ @Override
+ public void serialize(Await await, DataOutputPlus out, int version) throws IOException
+ {
+ CommandSerializers.txnId.serialize(await.txnId, out, version);
+ KeySerializers.participants.serialize(await.scope, out, version);
+ out.writeByte(await.blockedUntil.ordinal());
+ out.writeUnsignedVInt32(await.callbackId + 1);
+ Invariants.checkState(await.callbackId >= -1);
Review Comment:
Somewhat confused by this, I see synchronous await using `callbackId` `Integer.MIN_VALUE`, I also see `Integer.MAX_VALUE` being passed in as a `callbackId` some of the time. I am not sure how things are supposed to work.
##########
src/java/org/apache/cassandra/service/accord/interop/AccordInteropApply.java:
##########
@@ -248,20 +245,14 @@ public void onChange(SafeCommandStore safeStore, SafeCommand safeCommand)
case PreCommitted:
case Committed:
case PreApplied:
- return;
+ return true;
case Applied:
case Invalidated:
case Truncated:
}
- if (safeCommand.removeListener(this))
- ack();
- }
-
- @Override
- public PreLoadContext listenerPreLoadContext(TxnId caller)
- {
- return PreLoadContext.contextFor(txnId);
+ ack();
Review Comment:
This was conditional on the listener having been installed before. I wonder why. If `notify` is called then the listener has been installed by definition at this command store?
It seems like here if you got notified for `Applied`, `Invalidated`, or `Truncated` then `ack` could be called multiple times for the same command store and I am not sure that is intended?
This is copy pasta from an old version of `ReadData` so I don't think it was accidental.
##########
test/unit/org/apache/cassandra/service/accord/AccordTestUtils.java:
##########
@@ -420,7 +401,12 @@ public static AccordCommandStore createAccordCommandStore(
time,
new AccordAgent(),
null,
- cs -> NOOP_PROGRESS_LOG,
+ cs -> new NoOpProgressLog(),
+ cs -> new DefaultLocalListeners(new RemoteListeners.NoOpRemoteListeners(), new DefaultLocalListeners.NotifySink()
Review Comment:
Are no op listeners going to be sufficient for all the tests that use this?
##########
src/java/org/apache/cassandra/triggers/TriggerExecutor.java:
##########
@@ -19,11 +19,6 @@
package org.apache.cassandra.triggers;
import java.nio.ByteBuffer;
-import java.util.ArrayList;
Review Comment:
They shouldn't both be there, but this doesn't match C* code style, with the correct IntelliJ settings it should automatically be converting the * import into individual imports. You are going to constantly churn imports with everyone else if your IDE is set up incorrectly.
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1754932846
##########
src/java/org/apache/cassandra/service/accord/SavedCommand.java:
##########
@@ -69,8 +68,7 @@ private enum HasFields
PARTIAL_DEPS,
ADDITIONAL_KEYS,
WAITING_ON,
- WRITES,
- LISTENERS
+ WRITES
Review Comment:
Yes, and managed separately now anyway. This is the LocalListeners collection.
--
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] Refine ProgressLog [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1759234861
##########
src/java/org/apache/cassandra/service/accord/api/AccordAgent.java:
##########
@@ -182,29 +185,37 @@ public long attemptCoordinationDelay(Node node, SafeCommandStore safeStore, TxnI
RoutingKey homeKey = command.route().homeKey();
Shard shard = node.topology().forEpochIfKnown(homeKey, command.txnId().epoch());
+ // TODO (expected): make this a configurable calculation on normal request latencies (like ContentionStrategy)
long oneSecond = SECONDS.toMicros(1L);
+ long startTime = mostRecentAttempt.hlc() + DatabaseDescriptor.getAccord().recover_delay.to(MICROSECONDS)
Review Comment:
I don't understand this, the `hlc` + the recovery delayConfig + `retryCount` == 0 then return 0 otherwise a random number?
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith merged PR #3490:
URL: https://github.com/apache/cassandra/pull/3490
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1754583845
##########
src/java/org/apache/cassandra/triggers/TriggerExecutor.java:
##########
@@ -19,11 +19,6 @@
package org.apache.cassandra.triggers;
import java.nio.ByteBuffer;
-import java.util.ArrayList;
Review Comment:
This was just an automated removed unused, I think? Since unused imports break the build. The star import was already there. Happy to swap this to removing the star import if that is indeed below the threshold (might include additional classes of course)
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1754945135
##########
src/java/org/apache/cassandra/service/accord/AccordService.java:
##########
@@ -149,6 +149,7 @@ public class AccordService implements IAccordService, Shutdownable
private enum State { INIT, STARTED, SHUTDOWN}
+ // TODO (required): these are unused?
Review Comment:
are they *meant* to be used though?
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1754607184
##########
src/java/org/apache/cassandra/service/accord/serializers/CommandsForKeySerializer.java:
##########
@@ -350,6 +354,8 @@ public static ByteBuffer toBytesWithoutKey(CommandsForKey cfk)
VIntCoding.writeUnsignedVInt(prevEpoch, out);
VIntCoding.writeUnsignedVInt(prevHlc, out);
+ VIntCoding.writeUnsignedVInt32(cfk.redundantBefore().flags(), out);
Review Comment:
Hmm, looks like the standard serialiser takes up more space. But sure, don't mind using it - but perhaps we should encode epoch/hlc/flags separately in the standard serialiser.
--
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] Refine ProgressLog [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1759239174
##########
src/java/org/apache/cassandra/triggers/TriggerExecutor.java:
##########
@@ -19,11 +19,6 @@
package org.apache.cassandra.triggers;
import java.nio.ByteBuffer;
-import java.util.ArrayList;
Review Comment:
You are right the imports are redundant with the * import, but if you have the correct style settings then it would remove the star import not the individual imports.
<img width="1009" alt="image" src="https://github.com/user-attachments/assets/25d50349-ba50-4ee1-8cca-825c3957a3d9">
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1754813881
##########
src/java/org/apache/cassandra/service/accord/serializers/AwaitSerializer.java:
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.service.accord.serializers;
+
+import java.io.IOException;
+
+import accord.api.ProgressLog.BlockedUntil;
+import accord.local.SaveStatus;
+import accord.messages.Await;
+import accord.messages.Await.AsyncAwaitComplete;
+import accord.messages.Await.AwaitOk;
+import accord.primitives.Participants;
+import accord.primitives.Route;
+import accord.primitives.TxnId;
+import accord.utils.Invariants;
+import org.apache.cassandra.db.TypeSizes;
+import org.apache.cassandra.io.IVersionedSerializer;
+import org.apache.cassandra.io.util.DataInputPlus;
+import org.apache.cassandra.io.util.DataOutputPlus;
+import org.apache.cassandra.utils.vint.VIntCoding;
+
+public class AwaitSerializer
+{
+ public static final IVersionedSerializer<Await> request = new IVersionedSerializer<>()
+ {
+ @Override
+ public void serialize(Await await, DataOutputPlus out, int version) throws IOException
+ {
+ CommandSerializers.txnId.serialize(await.txnId, out, version);
+ KeySerializers.participants.serialize(await.scope, out, version);
+ out.writeByte(await.blockedUntil.ordinal());
+ out.writeUnsignedVInt32(await.callbackId + 1);
+ Invariants.checkState(await.callbackId >= -1);
Review Comment:
you're right, they should pass -1
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1754959227
##########
src/java/org/apache/cassandra/service/accord/AccordKeyspace.java:
##########
@@ -623,11 +620,11 @@ public Row withoutRedundantCommands(PartitionKey key, Row row, RedundantBefore.E
if (current == null)
return null;
- CommandsForKey updated = current.withRedundantBeforeAtLeast(redundantBefore);
+ CommandsForKey updated = current.withRedundantBeforeAtLeast(redundantBefore.shardRedundantBefore());
if (current == updated)
return row;
- if (updated.size() == 0)
+ if (updated.size() == 0 && updated.prunedBefore() == CommandsForKey.NO_INFO)
Review Comment:
I think in retrospect I don't need the modification anyway, as updated must be non-empty if prunedBefore != NO_INFO
--
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] Refine ProgressLog [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1759167565
##########
test/unit/org/apache/cassandra/service/accord/AccordTestUtils.java:
##########
@@ -420,7 +401,12 @@ public static AccordCommandStore createAccordCommandStore(
time,
new AccordAgent(),
null,
- cs -> NOOP_PROGRESS_LOG,
+ cs -> new NoOpProgressLog(),
+ cs -> new DefaultLocalListeners(new RemoteListeners.NoOpRemoteListeners(), new DefaultLocalListeners.NotifySink()
Review Comment:
None of the tests break!
--
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