(cassandra) branch cep-15-accord updated: Move preaccept expiration logic away from Agent

2024-05-17 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-15-accord by this push:
 new 5b24707c72 Move preaccept expiration logic away from Agent
5b24707c72 is described below

commit 5b24707c729693b0bfdd6e154f70aad7daa2e4ca
Author: Aleksey Yeschenko 
AuthorDate: Mon May 13 15:08:32 2024 +0100

Move preaccept expiration logic away from Agent

patch by Aleksey Yeschenko; reviewed by Alex Petrov and Benedict Elliott 
Smith for CASSANDRA-1
---
 modules/accord |  2 +-
 .../org/apache/cassandra/service/accord/api/AccordAgent.java   | 10 +++---
 .../cassandra/service/accord/SimulatedAccordCommandStore.java  |  4 ++--
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/modules/accord b/modules/accord
index 256b35e27d..d63d06aafe 16
--- a/modules/accord
+++ b/modules/accord
@@ -1 +1 @@
-Subproject commit 256b35e27d170db9fcd8024d5678b4f6e9d3a956
+Subproject commit d63d06aafe2e60e57a9651ff6dd491175bbe6916
diff --git a/src/java/org/apache/cassandra/service/accord/api/AccordAgent.java 
b/src/java/org/apache/cassandra/service/accord/api/AccordAgent.java
index 33f8f2b088..9c4b678996 100644
--- a/src/java/org/apache/cassandra/service/accord/api/AccordAgent.java
+++ b/src/java/org/apache/cassandra/service/accord/api/AccordAgent.java
@@ -35,7 +35,6 @@ import accord.primitives.Seekables;
 import accord.primitives.Timestamp;
 import accord.primitives.Txn;
 import accord.primitives.Txn.Kind;
-import accord.primitives.TxnId;
 import org.apache.cassandra.service.accord.AccordService;
 import org.apache.cassandra.metrics.AccordMetrics;
 import org.apache.cassandra.service.accord.txn.TxnQuery;
@@ -114,13 +113,10 @@ public class AccordAgent implements Agent
 }
 
 @Override
-public boolean isExpired(TxnId initiated, long now)
+public long preAcceptTimeout()
 {
-// TODO: should distinguish between reads and writes
-if (initiated.kind().isSyncPoint())
-return false;
-
-return now - initiated.hlc() > getReadRpcTimeout(MICROSECONDS);
+// TODO: should distinguish between reads and writes (Aleksey: why? 
and why read rpc timeout is being used?)
+return getReadRpcTimeout(MICROSECONDS);
 }
 
 @Override
diff --git 
a/test/unit/org/apache/cassandra/service/accord/SimulatedAccordCommandStore.java
 
b/test/unit/org/apache/cassandra/service/accord/SimulatedAccordCommandStore.java
index 1a1b7f98d2..a0bb647c41 100644
--- 
a/test/unit/org/apache/cassandra/service/accord/SimulatedAccordCommandStore.java
+++ 
b/test/unit/org/apache/cassandra/service/accord/SimulatedAccordCommandStore.java
@@ -149,9 +149,9 @@ public class SimulatedAccordCommandStore implements 
AutoCloseable
 new TestAgent.RethrowAgent()
 {
 @Override
-public boolean isExpired(TxnId 
initiated, long now)
+public long preAcceptTimeout()
 {
-return false;
+return Long.MAX_VALUE;
 }
 
 @Override


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



(cassandra-accord) branch trunk updated: Move preaccept expiration logic away from Agent

2024-05-17 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


The following commit(s) were added to refs/heads/trunk by this push:
 new d63d06aa Move preaccept expiration logic away from Agent
d63d06aa is described below

commit d63d06aafe2e60e57a9651ff6dd491175bbe6916
Author: Aleksey Yeschenko 
AuthorDate: Fri May 17 13:33:57 2024 +0100

Move preaccept expiration logic away from Agent

patch by Aleksey Yeschenko; reviewed by Alex Petrov, Benedict Elliott 
Smith, and David Capwell for CASSANDRA-1
---
 accord-core/src/main/java/accord/api/Agent.java|  6 +++--
 .../accord/coordinate/CoordinateTransaction.java   |  2 +-
 .../src/main/java/accord/local/CommandStore.java   |  7 +-
 .../java/accord/messages/ExecutionContext.java | 29 ++
 .../src/test/java/accord/impl/TestAgent.java   |  9 ---
 .../src/test/java/accord/impl/list/ListAgent.java  |  5 ++--
 .../main/java/accord/maelstrom/MaelstromAgent.java | 10 
 7 files changed, 52 insertions(+), 16 deletions(-)

diff --git a/accord-core/src/main/java/accord/api/Agent.java 
b/accord-core/src/main/java/accord/api/Agent.java
index f229ab82..06ed2f98 100644
--- a/accord-core/src/main/java/accord/api/Agent.java
+++ b/accord-core/src/main/java/accord/api/Agent.java
@@ -26,7 +26,6 @@ import accord.primitives.Ranges;
 import accord.primitives.Seekables;
 import accord.primitives.Timestamp;
 import accord.primitives.Txn;
-import accord.primitives.TxnId;
 
 /**
  * Facility for augmenting node behaviour at specific points
@@ -70,7 +69,10 @@ public interface Agent extends UncaughtExceptionListener
 
 void onHandledException(Throwable t);
 
-boolean isExpired(TxnId initiated, long now);
+/**
+ * @return PreAccept timeout with implementation-defined resolution of the 
hybrid logical clock
+ */
+long preAcceptTimeout();
 
 Txn emptyTxn(Txn.Kind kind, Seekables keysOrRanges);
 
diff --git 
a/accord-core/src/main/java/accord/coordinate/CoordinateTransaction.java 
b/accord-core/src/main/java/accord/coordinate/CoordinateTransaction.java
index dc4395c9..0b05657d 100644
--- a/accord-core/src/main/java/accord/coordinate/CoordinateTransaction.java
+++ b/accord-core/src/main/java/accord/coordinate/CoordinateTransaction.java
@@ -84,7 +84,7 @@ public class CoordinateTransaction extends 
CoordinatePreAccept
 //  but by sending accept we rule 
out hybrid fast-path
 // TODO (low priority, efficiency): if we receive an expired 
response, perhaps defer to permit at least one other
 //  node to respond before 
invalidating
-if (executeAt.isRejected() || node.agent().isExpired(txnId, 
executeAt.hlc()))
+if (executeAt.isRejected() || executeAt.hlc() - txnId.hlc() >= 
node.agent().preAcceptTimeout())
 {
 proposeAndCommitInvalidate(node, Ballot.ZERO, txnId, 
route.homeKey(), route, executeAt,this);
 }
diff --git a/accord-core/src/main/java/accord/local/CommandStore.java 
b/accord-core/src/main/java/accord/local/CommandStore.java
index 8e2f18eb..1d5a3913 100644
--- a/accord-core/src/main/java/accord/local/CommandStore.java
+++ b/accord-core/src/main/java/accord/local/CommandStore.java
@@ -319,8 +319,13 @@ public abstract class CommandStore implements AgentExecutor
  */
 final Timestamp preaccept(TxnId txnId, Seekables keys, 
SafeCommandStore safeStore, boolean permitFastPath)
 {
+// TODO (expected): make preAcceptTimeout() be a part of 
SafeCommandStore, initiated from ExecutionContext;
+//  preAcceptTimeout can be subject to local configuration 
changes, which would break determinism of repeated
+//  message processing, if, say, replayed from a log.
+
 NodeTimeService time = safeStore.time();
-boolean isExpired = agent().isExpired(txnId, safeStore.time().now());
+
+boolean isExpired = time.now() - txnId.hlc() >= 
agent().preAcceptTimeout() && !txnId.kind().isSyncPoint();
 if (rejectBefore != null && !isExpired)
 isExpired = null == rejectBefore.foldl(keys, (rejectIfBefore, 
test) -> rejectIfBefore.compareTo(test) > 0 ? null : test, txnId, 
Objects::isNull);
 
diff --git a/accord-core/src/main/java/accord/messages/ExecutionContext.java 
b/accord-core/src/main/java/accord/messages/ExecutionContext.java
new file mode 100644
index ..dbf4c2db
--- /dev/null
+++ b/accord-core/src/main/java/accord/messages/ExecutionContext.java
@@ -0,0 +1,29 @@
+/*
+ * 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

[jira] [Updated] (CASSANDRA-19600) Resolve the oldest hints just from descriptors and current writer if available

2024-05-01 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19600:
--
Status: Ready to Commit  (was: Review In Progress)

> Resolve the oldest hints just from descriptors and current writer if available
> --
>
> Key: CASSANDRA-19600
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19600
> Project: Cassandra
>  Issue Type: Bug
>  Components: Legacy/Core
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 5.0.x, 5.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We should not resolve hints from buffers as these are just very short-lived / 
> transient data structures and resolving "the oldest hints" from buffers too 
> just does not make sense when we should just look into descriptors and 
> current writer's descriptor at most.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19600) Resolve the oldest hints just from descriptors and current writer if available

2024-04-30 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19600:
--
Reviewers: Aleksey Yeschenko

> Resolve the oldest hints just from descriptors and current writer if available
> --
>
> Key: CASSANDRA-19600
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19600
> Project: Cassandra
>  Issue Type: Bug
>  Components: Legacy/Core
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 5.0.x, 5.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We should not resolve hints from buffers as these are just very short-lived / 
> transient data structures and resolving "the oldest hints" from buffers too 
> just does not make sense when we should just look into descriptors and 
> current writer's descriptor at most.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19477) Do not go to disk to get HintsStore.getTotalFileSize

2024-03-25 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19477:
--
Status: Ready to Commit  (was: Review In Progress)

+1, good stuff

> Do not go to disk to get HintsStore.getTotalFileSize
> 
>
> Key: CASSANDRA-19477
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19477
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Jon Haddad
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 5.0-rc, 5.x
>
> Attachments: flame-cassandra0-patched-2024-03-25_00-40-47.html, 
> flame-cassandra0-release-2024-03-25_00-16-44.html, flamegraph.cpu.html, 
> image-2024-03-24-17-57-32-560.png, image-2024-03-24-18-08-36-918.png, 
> image-2024-03-24-18-16-50-370.png, image-2024-03-24-18-17-48-334.png, 
> image-2024-03-24-18-20-07-734.png
>
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> When testing a cluster with more requests than it could handle, I noticed 
> significant CPU time (25%) spent in HintsStore.getTotalFileSize.  Here's what 
> I'm seeing from profiling:
> 10% of CPU time spent in HintsDescriptor.fileName which only does this:
>  
> {noformat}
> return String.format("%s-%s-%s.hints", hostId, timestamp, version);{noformat}
> At a bare minimum here we should create this string up front with the host 
> and version and eliminate 2 of the 3 substitutions, but I think it's probably 
> faster to use a StringBuilder and avoid the underlying regular expression 
> altogether.
> 12% of the time is spent in org.apache.cassandra.io.util.File.length.  It 
> looks like this is called once for each hint file on disk for each host we're 
> hinting to.  In the case of an overloaded cluster, this is significant.  It 
> would be better if we were to track the file size in memory for each hint 
> file and reference that rather than go to the filesystem.
> These fairly small changes should make Cassandra more reliable when under 
> load spikes.
> CPU Flame graph attached.
> I only tested this in 4.1 but it looks like this is present up to trunk.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19477) Do not go to disk to get HintsStore.getTotalFileSize

2024-03-25 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19477:
--
Status: Patch Available  (was: Needs Committer)

> Do not go to disk to get HintsStore.getTotalFileSize
> 
>
> Key: CASSANDRA-19477
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19477
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Jon Haddad
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 5.0-rc, 5.x
>
> Attachments: flame-cassandra0-patched-2024-03-25_00-40-47.html, 
> flame-cassandra0-release-2024-03-25_00-16-44.html, flamegraph.cpu.html, 
> image-2024-03-24-17-57-32-560.png, image-2024-03-24-18-08-36-918.png, 
> image-2024-03-24-18-16-50-370.png, image-2024-03-24-18-17-48-334.png, 
> image-2024-03-24-18-20-07-734.png
>
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> When testing a cluster with more requests than it could handle, I noticed 
> significant CPU time (25%) spent in HintsStore.getTotalFileSize.  Here's what 
> I'm seeing from profiling:
> 10% of CPU time spent in HintsDescriptor.fileName which only does this:
>  
> {noformat}
> return String.format("%s-%s-%s.hints", hostId, timestamp, version);{noformat}
> At a bare minimum here we should create this string up front with the host 
> and version and eliminate 2 of the 3 substitutions, but I think it's probably 
> faster to use a StringBuilder and avoid the underlying regular expression 
> altogether.
> 12% of the time is spent in org.apache.cassandra.io.util.File.length.  It 
> looks like this is called once for each hint file on disk for each host we're 
> hinting to.  In the case of an overloaded cluster, this is significant.  It 
> would be better if we were to track the file size in memory for each hint 
> file and reference that rather than go to the filesystem.
> These fairly small changes should make Cassandra more reliable when under 
> load spikes.
> CPU Flame graph attached.
> I only tested this in 4.1 but it looks like this is present up to trunk.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19477) Do not go to disk to get HintsStore.getTotalFileSize

2024-03-25 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19477:
--
Reviewers: Aleksey Yeschenko, Aleksey Yeschenko  (was: Aleksey Yeschenko)
   Aleksey Yeschenko, Aleksey Yeschenko  (was: Aleksey Yeschenko)
   Status: Review In Progress  (was: Patch Available)

> Do not go to disk to get HintsStore.getTotalFileSize
> 
>
> Key: CASSANDRA-19477
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19477
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Jon Haddad
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.1.x, 5.0-rc, 5.x
>
> Attachments: flame-cassandra0-patched-2024-03-25_00-40-47.html, 
> flame-cassandra0-release-2024-03-25_00-16-44.html, flamegraph.cpu.html, 
> image-2024-03-24-17-57-32-560.png, image-2024-03-24-18-08-36-918.png, 
> image-2024-03-24-18-16-50-370.png, image-2024-03-24-18-17-48-334.png, 
> image-2024-03-24-18-20-07-734.png
>
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> When testing a cluster with more requests than it could handle, I noticed 
> significant CPU time (25%) spent in HintsStore.getTotalFileSize.  Here's what 
> I'm seeing from profiling:
> 10% of CPU time spent in HintsDescriptor.fileName which only does this:
>  
> {noformat}
> return String.format("%s-%s-%s.hints", hostId, timestamp, version);{noformat}
> At a bare minimum here we should create this string up front with the host 
> and version and eliminate 2 of the 3 substitutions, but I think it's probably 
> faster to use a StringBuilder and avoid the underlying regular expression 
> altogether.
> 12% of the time is spent in org.apache.cassandra.io.util.File.length.  It 
> looks like this is called once for each hint file on disk for each host we're 
> hinting to.  In the case of an overloaded cluster, this is significant.  It 
> would be better if we were to track the file size in memory for each hint 
> file and reference that rather than go to the filesystem.
> These fairly small changes should make Cassandra more reliable when under 
> load spikes.
> CPU Flame graph attached.
> I only tested this in 4.1 but it looks like this is present up to trunk.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19477) Do not go to disk to get HintsStore.getTotalFileSize

2024-03-20 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19477:
--
Reviewers: Aleksey Yeschenko

> Do not go to disk to get HintsStore.getTotalFileSize
> 
>
> Key: CASSANDRA-19477
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19477
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Jon Haddad
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 5.x
>
> Attachments: flamegraph.cpu.html
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> When testing a cluster with more requests than it could handle, I noticed 
> significant CPU time (25%) spent in HintsStore.getTotalFileSize.  Here's what 
> I'm seeing from profiling:
> 10% of CPU time spent in HintsDescriptor.fileName which only does this:
>  
> {noformat}
> return String.format("%s-%s-%s.hints", hostId, timestamp, version);{noformat}
> At a bare minimum here we should create this string up front with the host 
> and version and eliminate 2 of the 3 substitutions, but I think it's probably 
> faster to use a StringBuilder and avoid the underlying regular expression 
> altogether.
> 12% of the time is spent in org.apache.cassandra.io.util.File.length.  It 
> looks like this is called once for each hint file on disk for each host we're 
> hinting to.  In the case of an overloaded cluster, this is significant.  It 
> would be better if we were to track the file size in memory for each hint 
> file and reference that rather than go to the filesystem.
> These fairly small changes should make Cassandra more reliable when under 
> load spikes.
> CPU Flame graph attached.
> I only tested this in 4.1 but it looks like this is present up to trunk.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14572) Expose all table metrics in virtual table

2024-01-22 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-14572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17809361#comment-17809361
 ] 

Aleksey Yeschenko commented on CASSANDRA-14572:
---

It should be implemented in a way that regular polling is not a problem - no 
more than periodic polling of an equivalent regular table read.

> Expose all table metrics in virtual table
> -
>
> Key: CASSANDRA-14572
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14572
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Legacy/Observability, Observability/Metrics
>Reporter: Chris Lohfink
>Assignee: Maxim Muzafarov
>Priority: Low
>  Labels: virtual-tables
> Fix For: 5.x
>
> Attachments: keyspayces_group responses times.png, keyspayces_group 
> summary.png, select keyspaces_group by string prefix.png, select 
> keyspaces_group compare with wo.png, select keyspaces_group without 
> value.png, systemv_views.metrics_dropped_message.png, thread_pools 
> benchmark.png
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> While we want a number of virtual tables to display data in a way thats great 
> and intuitive like in nodetool. There is also much for being able to expose 
> the metrics we have for tooling via CQL instead of JMX. This is more for the 
> tooling and adhoc advanced users who know exactly what they are looking for.
> *Schema:*
> Initial idea is to expose data via {{((keyspace, table), metric)}} with a 
> column for each metric value. Could also use a Map or UDT instead of the 
> column based that can be a bit more specific to each metric type. To that end 
> there can be a {{metric_type}} column and then a UDT for each metric type 
> filled in, or a single value with more of a Map style. I am 
> purposing the column type though as with {{ALLOW FILTERING}} it does allow 
> more extensive query capabilities.
> *Implementations:*
> * Use reflection to grab all the metrics from TableMetrics (see: 
> CASSANDRA-7622 impl). This is easiest and least abrasive towards new metric 
> implementors... but its reflection and a kinda a bad idea.
> * Add a hook in TableMetrics to register with this virtual table when 
> registering
> * Pull from the CassandraMetrics registery (either reporter or iterate 
> through metrics query on read of virtual table)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19265) Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal but this may fail during CommitLogReplay for LocalPartitioner

2024-01-19 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19265:
--
  Fix Version/s: 5.1
 (was: 5.x)
  Since Version: 5.1-alpha1
Source Control Link: 
https://github.com/apache/cassandra/commit/91e8a22d63683e46d26c7d9a25df3b3d80eba500
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal 
> but this may fail during CommitLogReplay for LocalPartitioner
> --
>
> Key: CASSANDRA-19265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19265
> Project: Cassandra
>  Issue Type: Bug
>  Components: Accord
>Reporter: David Capwell
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.1
>
>
> This was found on the cep-15-accord branch.  We have a system table 
> all_commands_for_key and it seems that the LocalPartitioner pointer gets 
> changed, causing CommitLogReplyer to fail
> {code}
> java.lang.AssertionError: Update to key 
> DecoratedKey(11:01c93b4893674349ae:2b74bbca-eae8-3217-a675-115cf5642ef3\:3030312e302e393134,
>  
> 0004000b0901c93b4893674349ae2100102b74bbcaeae83217a675115cf5642ef300093030312e302e39313400)
>  with partitioner org.apache.cassandra.dht.LocalPartitioner@1fc4de9e (class 
> org.apache.cassandra.dht.LocalPartitioner) had an update 
> ([system_accord.all_commands_for_key]...) with a different partitioner! 
> org.apache.cassandra.dht.LocalPartitioner@c7d8be7 (class 
> org.apache.cassandra.dht.LocalPartitioner)
>   at org.apache.cassandra.utils.Throwables.unchecked(Throwables.java:308)
>   at org.apache.cassandra.utils.Throwables.cleaned(Throwables.java:327)
>   at 
> org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:544)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.handleMutation(CommitLogReplayer.java:521)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readMutation(CommitLogReader.java:478)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readSection(CommitLogReader.java:397)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:244)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:147)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:195)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:225)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:206)
>   at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:332)
>   at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:726)
>   at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:876)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19265) Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal but this may fail during CommitLogReplay for LocalPartitioner

2024-01-19 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19265:
--
Reviewers: Marcus Eriksson  (was: Aleksey Yeschenko, Marcus Eriksson)

> Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal 
> but this may fail during CommitLogReplay for LocalPartitioner
> --
>
> Key: CASSANDRA-19265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19265
> Project: Cassandra
>  Issue Type: Bug
>  Components: Accord
>Reporter: David Capwell
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.1
>
>
> This was found on the cep-15-accord branch.  We have a system table 
> all_commands_for_key and it seems that the LocalPartitioner pointer gets 
> changed, causing CommitLogReplyer to fail
> {code}
> java.lang.AssertionError: Update to key 
> DecoratedKey(11:01c93b4893674349ae:2b74bbca-eae8-3217-a675-115cf5642ef3\:3030312e302e393134,
>  
> 0004000b0901c93b4893674349ae2100102b74bbcaeae83217a675115cf5642ef300093030312e302e39313400)
>  with partitioner org.apache.cassandra.dht.LocalPartitioner@1fc4de9e (class 
> org.apache.cassandra.dht.LocalPartitioner) had an update 
> ([system_accord.all_commands_for_key]...) with a different partitioner! 
> org.apache.cassandra.dht.LocalPartitioner@c7d8be7 (class 
> org.apache.cassandra.dht.LocalPartitioner)
>   at org.apache.cassandra.utils.Throwables.unchecked(Throwables.java:308)
>   at org.apache.cassandra.utils.Throwables.cleaned(Throwables.java:327)
>   at 
> org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:544)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.handleMutation(CommitLogReplayer.java:521)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readMutation(CommitLogReader.java:478)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readSection(CommitLogReader.java:397)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:244)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:147)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:195)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:225)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:206)
>   at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:332)
>   at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:726)
>   at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:876)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19265) Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal but this may fail during CommitLogReplay for LocalPartitioner

2024-01-19 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19265:
--
Reviewers: Marcus Eriksson, Aleksey Yeschenko  (was: Marcus Eriksson)
   Marcus Eriksson, Aleksey Yeschenko  (was: Aleksey Yeschenko, 
Marcus Eriksson)
   Status: Review In Progress  (was: Patch Available)

> Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal 
> but this may fail during CommitLogReplay for LocalPartitioner
> --
>
> Key: CASSANDRA-19265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19265
> Project: Cassandra
>  Issue Type: Bug
>  Components: Accord
>Reporter: David Capwell
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.x
>
>
> This was found on the cep-15-accord branch.  We have a system table 
> all_commands_for_key and it seems that the LocalPartitioner pointer gets 
> changed, causing CommitLogReplyer to fail
> {code}
> java.lang.AssertionError: Update to key 
> DecoratedKey(11:01c93b4893674349ae:2b74bbca-eae8-3217-a675-115cf5642ef3\:3030312e302e393134,
>  
> 0004000b0901c93b4893674349ae2100102b74bbcaeae83217a675115cf5642ef300093030312e302e39313400)
>  with partitioner org.apache.cassandra.dht.LocalPartitioner@1fc4de9e (class 
> org.apache.cassandra.dht.LocalPartitioner) had an update 
> ([system_accord.all_commands_for_key]...) with a different partitioner! 
> org.apache.cassandra.dht.LocalPartitioner@c7d8be7 (class 
> org.apache.cassandra.dht.LocalPartitioner)
>   at org.apache.cassandra.utils.Throwables.unchecked(Throwables.java:308)
>   at org.apache.cassandra.utils.Throwables.cleaned(Throwables.java:327)
>   at 
> org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:544)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.handleMutation(CommitLogReplayer.java:521)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readMutation(CommitLogReader.java:478)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readSection(CommitLogReader.java:397)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:244)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:147)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:195)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:225)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:206)
>   at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:332)
>   at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:726)
>   at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:876)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



(cassandra) branch cep-15-accord updated (a609154245 -> 91e8a22d63)

2024-01-19 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a change to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from a609154245 fix fast path test epoch wait
 add 91e8a22d63 Fix LocalPartitioner duplication in *_for_key Accord system 
tables

No new revisions were added by this update.

Summary of changes:
 src/java/org/apache/cassandra/service/accord/AccordKeyspace.java | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19265) Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal but this may fail during CommitLogReplay for LocalPartitioner

2024-01-18 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19265:
--
Reviewers: Marcus Eriksson

> Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal 
> but this may fail during CommitLogReplay for LocalPartitioner
> --
>
> Key: CASSANDRA-19265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19265
> Project: Cassandra
>  Issue Type: Bug
>  Components: Transactional Cluster Metadata
>Reporter: David Capwell
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.x
>
>
> This was found on the cep-15-accord branch.  We have a system table 
> all_commands_for_key and it seems that the LocalPartitioner pointer gets 
> changed, causing CommitLogReplyer to fail
> {code}
> java.lang.AssertionError: Update to key 
> DecoratedKey(11:01c93b4893674349ae:2b74bbca-eae8-3217-a675-115cf5642ef3\:3030312e302e393134,
>  
> 0004000b0901c93b4893674349ae2100102b74bbcaeae83217a675115cf5642ef300093030312e302e39313400)
>  with partitioner org.apache.cassandra.dht.LocalPartitioner@1fc4de9e (class 
> org.apache.cassandra.dht.LocalPartitioner) had an update 
> ([system_accord.all_commands_for_key]...) with a different partitioner! 
> org.apache.cassandra.dht.LocalPartitioner@c7d8be7 (class 
> org.apache.cassandra.dht.LocalPartitioner)
>   at org.apache.cassandra.utils.Throwables.unchecked(Throwables.java:308)
>   at org.apache.cassandra.utils.Throwables.cleaned(Throwables.java:327)
>   at 
> org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:544)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.handleMutation(CommitLogReplayer.java:521)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readMutation(CommitLogReader.java:478)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readSection(CommitLogReader.java:397)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:244)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:147)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:195)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:225)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:206)
>   at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:332)
>   at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:726)
>   at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:876)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-19265) Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal but this may fail during CommitLogReplay for LocalPartitioner

2024-01-18 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-19265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-19265:
--
Test and Documentation Plan: N/A
 Status: Patch Available  (was: Open)

> Mutation.PartitionUpdateCollector#add asserts Partitioner pointers are equal 
> but this may fail during CommitLogReplay for LocalPartitioner
> --
>
> Key: CASSANDRA-19265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19265
> Project: Cassandra
>  Issue Type: Bug
>  Components: Transactional Cluster Metadata
>Reporter: David Capwell
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.x
>
>
> This was found on the cep-15-accord branch.  We have a system table 
> all_commands_for_key and it seems that the LocalPartitioner pointer gets 
> changed, causing CommitLogReplyer to fail
> {code}
> java.lang.AssertionError: Update to key 
> DecoratedKey(11:01c93b4893674349ae:2b74bbca-eae8-3217-a675-115cf5642ef3\:3030312e302e393134,
>  
> 0004000b0901c93b4893674349ae2100102b74bbcaeae83217a675115cf5642ef300093030312e302e39313400)
>  with partitioner org.apache.cassandra.dht.LocalPartitioner@1fc4de9e (class 
> org.apache.cassandra.dht.LocalPartitioner) had an update 
> ([system_accord.all_commands_for_key]...) with a different partitioner! 
> org.apache.cassandra.dht.LocalPartitioner@c7d8be7 (class 
> org.apache.cassandra.dht.LocalPartitioner)
>   at org.apache.cassandra.utils.Throwables.unchecked(Throwables.java:308)
>   at org.apache.cassandra.utils.Throwables.cleaned(Throwables.java:327)
>   at 
> org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:544)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.handleMutation(CommitLogReplayer.java:521)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readMutation(CommitLogReader.java:478)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readSection(CommitLogReader.java:397)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:244)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:147)
>   at 
> org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:195)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:225)
>   at 
> org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:206)
>   at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:332)
>   at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:726)
>   at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:876)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



(cassandra) branch cep-15-accord updated (cc9f18b16f -> 7831ed8dfe)

2024-01-17 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a change to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from cc9f18b16f Ninja: Added check that command.route is not null when SPL 
is trying to inform, saw this event in CI and need more details to know what 
happened
 add 7831ed8dfe Pre-requisite changes for CASSANDRA-1

No new revisions were added by this update.

Summary of changes:
 modules/accord |   2 +-
 .../apache/cassandra/journal/ActiveSegment.java| 132 +---
 .../apache/cassandra/journal/AsyncCallbacks.java   |  45 ++
 .../cassandra/journal/AsyncWriteCallback.java  |  29 -
 .../org/apache/cassandra/journal/Descriptor.java   |   2 +-
 .../apache/cassandra/journal/EntrySerializer.java  |   6 +-
 src/java/org/apache/cassandra/journal/Flusher.java |  77 +--
 src/java/org/apache/cassandra/journal/Journal.java | 153 +++--
 src/java/org/apache/cassandra/journal/Segment.java |   8 +-
 .../org/apache/cassandra/journal/Segments.java | 210 +++---
 .../apache/cassandra/journal/StaticSegment.java|  36 +-
 src/java/org/apache/cassandra/net/Message.java |  21 +-
 .../ResponseContext.java}  |  13 +-
 .../service/accord/AccordCommandStore.java |   8 +-
 .../cassandra/service/accord/AccordJournal.java| 732 ++---
 .../service/accord/AccordMessageSink.java  |  52 +-
 .../cassandra/service/accord/AccordService.java|  43 +-
 .../service/accord/AccordVerbHandler.java  |  50 +-
 .../accord/serializers/ReadDataSerializers.java|   4 +-
 .../distributed/test/accord/AccordTestBase.java|   1 -
 .../test/AccordJournalSimulationTest.java  |  40 +-
 .../org/apache/cassandra/journal/JournalTest.java  |  12 +-
 .../org/apache/cassandra/journal/SegmentTest.java  |   8 +-
 .../cassandra/service/accord/AccordTestUtils.java  |   4 +-
 24 files changed, 1121 insertions(+), 567 deletions(-)
 create mode 100644 src/java/org/apache/cassandra/journal/AsyncCallbacks.java
 delete mode 100644 
src/java/org/apache/cassandra/journal/AsyncWriteCallback.java
 copy src/java/org/apache/cassandra/{repair/asymmetric/PreferedNodeFilter.java 
=> net/ResponseContext.java} (79%)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



(cassandra-accord) branch trunk updated: Pre-requisite changes for CASSANDRA-18888 (#74)

2024-01-17 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


The following commit(s) were added to refs/heads/trunk by this push:
 new c524b6d  Pre-requisite changes for CASSANDRA-1 (#74)
c524b6d is described below

commit c524b6d3de3923ccb6314715bd987f3b891348ab
Author: Aleksey Yeschenko 
AuthorDate: Wed Jan 17 15:14:00 2024 +

Pre-requisite changes for CASSANDRA-1 (#74)

patch by Aleksey Yeschenko; reviewed by Ariel Weisberg for
CASSANDRA-1
---
 .../src/main/java/accord/api/MessageSink.java  |   2 +-
 accord-core/src/main/java/accord/local/Node.java   |  29 +++---
 .../java/accord/messages/AbstractEpochRequest.java |   8 +-
 .../src/main/java/accord/messages/Commit.java  |   7 ++
 .../java/accord/messages/InformHomeDurable.java|   6 ++
 .../{LocalMessage.java => LocalRequest.java}   |  19 +++-
 .../src/main/java/accord/messages/MessageType.java | 114 -
 .../src/main/java/accord/messages/Propagate.java   |  32 +-
 .../src/main/java/accord/messages/Request.java |   5 +-
 .../src/main/java/accord/messages/TxnRequest.java  |   8 +-
 .../main/java/accord/messages/WaitOnCommit.java|   8 +-
 accord-core/src/test/java/accord/Utils.java|   8 +-
 .../accord/burn/BurnTestConfigurationService.java  |   6 ++
 .../src/test/java/accord/impl/basic/Cluster.java   |  16 +--
 .../test/java/accord/impl/list/ListRequest.java|   6 ++
 .../test/java/accord/impl/mock/MockCluster.java|   4 +-
 .../src/test/java/accord/local/CommandsTest.java   |   6 ++
 .../src/test/java/accord/utils/MessageTask.java|   6 ++
 .../src/main/java/accord/maelstrom/Cluster.java|   4 +-
 .../java/accord/maelstrom/MaelstromRequest.java|   6 ++
 .../src/main/java/accord/maelstrom/Main.java   |   4 +-
 21 files changed, 208 insertions(+), 96 deletions(-)

diff --git a/accord-core/src/main/java/accord/api/MessageSink.java 
b/accord-core/src/main/java/accord/api/MessageSink.java
index 47a3fa0..d05f304 100644
--- a/accord-core/src/main/java/accord/api/MessageSink.java
+++ b/accord-core/src/main/java/accord/api/MessageSink.java
@@ -28,7 +28,7 @@ import accord.messages.Request;
 public interface MessageSink
 {
 void send(Id to, Request request);
-void send(Id to, Request request, AgentExecutor executor, Callback 
callback);
+void send(Id to, Request request, AgentExecutor executor, Callback 
callback);
 void reply(Id replyingToNode, ReplyContext replyContext, Reply reply);
 void replyWithUnknownFailure(Id replyingToNode, ReplyContext replyContext, 
Throwable failure);
 }
diff --git a/accord-core/src/main/java/accord/local/Node.java 
b/accord-core/src/main/java/accord/local/Node.java
index 9e67cfa..6fc883e 100644
--- a/accord-core/src/main/java/accord/local/Node.java
+++ b/accord-core/src/main/java/accord/local/Node.java
@@ -65,7 +65,7 @@ import accord.coordinate.Persist;
 import accord.coordinate.RecoverWithRoute;
 import accord.messages.Apply;
 import accord.messages.Callback;
-import accord.messages.LocalMessage;
+import accord.messages.LocalRequest;
 import accord.messages.Reply;
 import accord.messages.ReplyContext;
 import accord.messages.Request;
@@ -147,7 +147,7 @@ public class Node implements ConfigurationService.Listener, 
NodeTimeService
 
 private final Id id;
 private final MessageSink messageSink;
-private final LocalMessage.Handler localMessageHandler;
+private final LocalRequest.Handler localRequestHandler;
 private final ConfigurationService configService;
 private final TopologyManager topology;
 private final CommandStores commandStores;
@@ -168,7 +168,7 @@ public class Node implements ConfigurationService.Listener, 
NodeTimeService
 // TODO (expected, liveness): monitor the contents of this collection for 
stalled coordination, and excise them
 private final Map> coordinating = 
new ConcurrentHashMap<>();
 
-public Node(Id id, MessageSink messageSink, LocalMessage.Handler 
localMessageHandler,
+public Node(Id id, MessageSink messageSink, LocalRequest.Handler 
localRequestHandler,
 ConfigurationService configService, LongSupplier nowSupplier, 
ToLongFunction nowTimeUnit,
 Supplier dataSupplier, ShardDistributor 
shardDistributor, Agent agent, RandomSource random, Scheduler scheduler, 
TopologySorter.Supplier topologySorter,
 Function progressLogFactory, 
CommandStores.Factory factory, Execute.Factory executionFactory, 
Persist.Factory persistFactory, Apply.Factory applyFactory,
@@ -177,7 +177,7 @@ public class Node implements ConfigurationService.Listener, 
NodeTimeService
 this.id = id;
 this.localConfig = localConfig;
 this.messageSink = messageSink;
-this.localMessageHandler = localMessageHandler;
+this.localRequestHandler = localRe

(cassandra) branch cep-15-accord updated: Quick fix for AccordCommandStoreTest#commandLoadSave()

2023-11-17 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-15-accord by this push:
 new adaf579741 Quick fix for AccordCommandStoreTest#commandLoadSave()
adaf579741 is described below

commit adaf579741b44a9b2dfdb754e0b28c3a1400776a
Author: Aleksey Yeschenko 
AuthorDate: Fri Nov 17 16:01:47 2023 +

Quick fix for AccordCommandStoreTest#commandLoadSave()
---
 .../org/apache/cassandra/service/accord/AccordCommandStoreTest.java| 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/test/unit/org/apache/cassandra/service/accord/AccordCommandStoreTest.java 
b/test/unit/org/apache/cassandra/service/accord/AccordCommandStoreTest.java
index 9ee1efe9c0..e3cb042cb1 100644
--- a/test/unit/org/apache/cassandra/service/accord/AccordCommandStoreTest.java
+++ b/test/unit/org/apache/cassandra/service/accord/AccordCommandStoreTest.java
@@ -111,6 +111,7 @@ public class AccordCommandStoreTest
 CommonAttributes.Mutable attrs = new CommonAttributes.Mutable(txnId);
 PartialTxn txn = createPartialTxn(0);
 Route route = 
RoutingKeys.of(key.toUnseekable()).toRoute(key.toUnseekable());
+attrs.partialTxn(txn);
 attrs.route(route);
 attrs.durability(Majority);
 Ballot promised = ballot(1, clock.incrementAndGet(), 1);
@@ -139,7 +140,7 @@ public class AccordCommandStoreTest
   depTxn.keys(),
   executeAt,
   dependencies,
-  null,
+  txn,
   result.left,
   Result.APPLIED);
 commandStore.appendToJournal(apply);


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-7662) Implement templated CREATE TABLE functionality (CREATE TABLE LIKE)

2023-11-06 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-7662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17783192#comment-17783192
 ] 

Aleksey Yeschenko commented on CASSANDRA-7662:
--

This was never intended to copy and data. Only copying the structure (metadata) 
of the original table - params, columns, indexes.

> Implement templated CREATE TABLE functionality (CREATE TABLE LIKE)
> --
>
> Key: CASSANDRA-7662
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7662
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Legacy/CQL
>    Reporter: Aleksey Yeschenko
>Priority: Low
>  Labels: AdventCalendar2021, lhf
> Fix For: 5.x
>
> Attachments: 7662.patch, CASSANDRA-7662.patch
>
>
> Implement templated CREATE TABLE functionality (CREATE TABLE LIKE) to 
> simplify creating new tables duplicating existing ones (see parent_table part 
> of  http://www.postgresql.org/docs/9.1/static/sql-createtable.html).
> CREATE TABLE  LIKE ; - would create a new table with 
> the same columns and options as 
> +Additional info for newcomers:+
> In order to implement this change you will need to change the Parser.g ANTLR 
> file located in the src/antlr directory and the java classes corresponding to 
> the CREATE statement located in the 
> org.apache.cassandra.cql3.statements.schema package.
> The unit test for the CQL logic are located under 
> org.apache.cassandra.cql3.validation
> cqlsh parsing will need to be modified to support the new LIKE syntax. The 
> logic is in pylib/cqlshlib/cql3handling.py and the test in 
> pylib/cqlshlib/test/test_cqlsh_completion.py



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18314) Lift MessagingService.minimum_version to 40

2023-11-02 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782118#comment-17782118
 ] 

Aleksey Yeschenko commented on CASSANDRA-18314:
---

I think you may have been overly enthusiastic with these removals. 
Specifically, removing 3.0 deser support for {{Mutation}} affects more than 
just messaging service. Even in 5.0 you still need to be able to deserialize 
old mutations in hints, commit log, and batch log. Someone going from 3.0 via 
4.0 to 5.0 will still have those present.

> Lift MessagingService.minimum_version to 40
> ---
>
> Key: CASSANDRA-18314
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18314
> Project: Cassandra
>  Issue Type: Task
>  Components: Messaging/Internode
>Reporter: Michael Semb Wever
>Assignee: Michael Semb Wever
>Priority: Normal
> Fix For: 5.0, 5.0-alpha1
>
>  Time Spent: 15h 20m
>  Remaining Estimate: 0h
>
> MessagingService's VERSION_30 and VERSION_3014 don't have to be supported in 
> Cassandra 5.0 anymore.
> (Cassandra 5.0 currently is still using VERSION_40)
> Patch: 
> https://github.com/apache/cassandra/compare/trunk...thelastpickle:cassandra:mck/18314/trunk
> Raises the question whether backward compatibility to the previous major is 
> defined by the Cassandra version or by the internal component version 
> (MessagingService).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18964) Vector type in UDTs can break schema loading

2023-10-26 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18964:
--
  Fix Version/s: 5.0-alpha2
 (was: 5.0)
  Since Version: 5.0-alpha1
Source Control Link: 
https://github.com/apache/cassandra/commit/7d54a62ccc27f89bb6ee55b8f17005cf4c444231
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

Committed to 5.0 and trunk, cheers.

> Vector type in UDTs can break schema loading 
> -
>
> Key: CASSANDRA-18964
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18964
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0-alpha2
>
>
> {{RawVector}} doesn’t override {{referencesUserType(String name)}}, which 
> causes {{Types.RawBuilder.build()}} to not populate UDT dependency DAG 
> correctly. Then depending on natural iteration order or the vertices map,  a 
> UDT with a vector referencing another UDT can fail to resolve, if that 
> referenced UDT has not been resolved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18964) Vector type in UDTs can break schema loading

2023-10-26 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18964:
--
Status: Ready to Commit  (was: Review In Progress)

> Vector type in UDTs can break schema loading 
> -
>
> Key: CASSANDRA-18964
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18964
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> {{RawVector}} doesn’t override {{referencesUserType(String name)}}, which 
> causes {{Types.RawBuilder.build()}} to not populate UDT dependency DAG 
> correctly. Then depending on natural iteration order or the vertices map,  a 
> UDT with a vector referencing another UDT can fail to resolve, if that 
> referenced UDT has not been resolved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18964) Vector type in UDTs can break schema loading

2023-10-26 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18964:
--
Reviewers: Marcus Eriksson, Aleksey Yeschenko  (was: Marcus Eriksson)
   Marcus Eriksson, Aleksey Yeschenko  (was: Aleksey Yeschenko, 
Marcus Eriksson)
   Status: Review In Progress  (was: Patch Available)

> Vector type in UDTs can break schema loading 
> -
>
> Key: CASSANDRA-18964
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18964
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> {{RawVector}} doesn’t override {{referencesUserType(String name)}}, which 
> causes {{Types.RawBuilder.build()}} to not populate UDT dependency DAG 
> correctly. Then depending on natural iteration order or the vertices map,  a 
> UDT with a vector referencing another UDT can fail to resolve, if that 
> referenced UDT has not been resolved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch cassandra-5.0 updated (3088b8114c -> 7d54a62ccc)

2023-10-26 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a change to branch cassandra-5.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 3088b8114c Merge branch 'cassandra-4.1' into cassandra-5.0
 add 7d54a62ccc Fix schema loading of UDTs inside vectors inside UDTs

No new revisions were added by this update.

Summary of changes:
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/CQL3Type.java|  6 ++
 .../cql3/validation/operations/CQLVectorTest.java   | 17 +
 3 files changed, 24 insertions(+)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] 01/01: Merge branch 'cassandra-5.0' into trunk

2023-10-26 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit f5fba9b702841401dfb769c4fcfc4cdde68822af
Merge: 45c6352938 7d54a62ccc
Author: Aleksey Yeschenko 
AuthorDate: Thu Oct 26 17:46:05 2023 +0100

Merge branch 'cassandra-5.0' into trunk

 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/CQL3Type.java|  6 ++
 .../cql3/validation/operations/CQLVectorTest.java   | 17 +
 3 files changed, 24 insertions(+)

diff --cc CHANGES.txt
index 2bc545c9f7,d0d38a08c8..60c5d91aaa
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,8 -1,5 +1,9 @@@
 -5.0-alpha2
 +5.1
 + * Add ELAPSED command to cqlsh (CASSANDRA-18861)
 + * Add the ability to disable bulk loading of SSTables (CASSANDRA-18781)
 + * Clean up obsolete functions and simplify cql_version handling in cqlsh 
(CASSANDRA-18787)
 +Merged from 5.0:
+  * Fix schema loading of UDTs inside vectors inside UDTs (CASSANDRA-18964)
   * Add cqlsh autocompletion for the vector data type (CASSANDRA-18946)
   * Fix nodetool tablehistograms output to avoid printing repeated information 
and ensure at most two arguments (CASSANDRA-18955)
   * Change the checksum algorithm SAI-related files use from CRC32 to CRC32C 
(CASSANDRA-18836)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch trunk updated (45c6352938 -> f5fba9b702)

2023-10-26 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 45c6352938 Merge branch 'cassandra-5.0' into trunk
 add 7d54a62ccc Fix schema loading of UDTs inside vectors inside UDTs
 new f5fba9b702 Merge branch 'cassandra-5.0' into trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/CQL3Type.java|  6 ++
 .../cql3/validation/operations/CQLVectorTest.java   | 17 +
 3 files changed, 24 insertions(+)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18964) Vector type in UDTs can break schema loading

2023-10-26 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18964:
--
Test and Documentation Plan: Existing test coverage
 Status: Patch Available  (was: Open)

> Vector type in UDTs can break schema loading 
> -
>
> Key: CASSANDRA-18964
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18964
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> {{RawVector}} doesn’t override {{referencesUserType(String name)}}, which 
> causes {{Types.RawBuilder.build()}} to not populate UDT dependency DAG 
> correctly. Then depending on natural iteration order or the vertices map,  a 
> UDT with a vector referencing another UDT can fail to resolve, if that 
> referenced UDT has not been resolved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18964) Vector type in UDTs can break schema loading

2023-10-26 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18964:
--
 Bug Category: Parent values: Availability(12983)Level 1 values: 
Unavailable(12994)
   Complexity: Normal
  Component/s: Cluster/Schema
Discovered By: Fuzz Test
Fix Version/s: 5.0
Reviewers: Marcus Eriksson
 Severity: Normal
   Status: Open  (was: Triage Needed)

> Vector type in UDTs can break schema loading 
> -
>
> Key: CASSANDRA-18964
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18964
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> {{RawVector}} doesn’t override {{referencesUserType(String name)}}, which 
> causes {{Types.RawBuilder.build()}} to not populate UDT dependency DAG 
> correctly. Then depending on natural iteration order or the vertices map,  a 
> UDT with a vector referencing another UDT can fail to resolve, if that 
> referenced UDT has not been resolved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-18964) Vector type in UDTs can break schema loading

2023-10-26 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-18964:
-

 Summary: Vector type in UDTs can break schema loading 
 Key: CASSANDRA-18964
 URL: https://issues.apache.org/jira/browse/CASSANDRA-18964
 Project: Cassandra
  Issue Type: Bug
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko


{{RawVector}} doesn’t override {{referencesUserType(String name)}}, which 
causes {{Types.RawBuilder.build()}} to not populate UDT dependency DAG 
correctly. Then depending on natural iteration order or the vertices map,  a 
UDT with a vector referencing another UDT can fail to resolve, if that 
referenced UDT has not been resolved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-13911) IllegalStateException thrown by UPI.Serializer.hasNext() for some SELECT queries

2023-10-18 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-13911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17776585#comment-17776585
 ] 

Aleksey Yeschenko commented on CASSANDRA-13911:
---

Indeed, if hidden is the right word for it. This was a pretty nasty one.

> IllegalStateException thrown by UPI.Serializer.hasNext() for some SELECT 
> queries
> 
>
> Key: CASSANDRA-13911
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13911
> Project: Cassandra
>  Issue Type: Bug
>  Components: Legacy/Coordination
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 3.0.15, 3.11.1
>
>
> Certain combinations of rows, in presence of per partition limit (set 
> explicitly in 3.6+ or implicitly to 1 via DISTINCT) cause 
> {{UnfilteredPartitionIterators.Serializer.hasNext()}} to throw 
> {{IllegalStateException}} .
> Relevant code snippet:
> {code}
> // We can't answer this until the previously returned iterator has been fully 
> consumed,
> // so complain if that's not the case.
> if (next != null && next.hasNext())
> throw new IllegalStateException("Cannot call hasNext() until the previous 
> iterator has been fully consumed");
> {code}
> Since {{UnfilteredPartitionIterators.Serializer}} and 
> {{UnfilteredRowIteratorSerializer.serializer}} deserialize partitions/rows 
> lazily, it is required for correct operation of the partition iterator to 
> have the previous partition fully consumed, so that deserializing the next 
> one can start from the correct position in the byte buffer. However, that 
> condition won’t always be satisfied, as there are legitimate combinations of 
> rows that do not consume every row in every partition.
> For example, look at [this 
> dtest|https://github.com/iamaleksey/cassandra-dtest/commits/13911].
> In case we end up with a following pattern of rows:
> {code}
> node1, partition 0 | 0
> node2, partition 0 |   x x
> {code}
> , where {{x}} and {{x}} a row tombstones for rows 1 and 2, it’s sufficient 
> for {{MergeIterator}} to only look at row 0 in partition from node1 and at 
> row tombstone 1 from node2 to satisfy the per partition limit of 1. The 
> stopping merge result counter will stop iteration right there, leaving row 
> tombstone 2 from node2 unvisited and not deseiralized. Switching to the next 
> partition will in turn trigger the {{IllegalStateException}} because we 
> aren’t done yet.
> The stopping counter is behaving correctly, so is the {{MergeIterator}}. I’ll 
> note that simply removing that condition is not enough to fix the problem 
> properly - it’d just cause us to deseiralize garbage, trying to deserialize a 
> new partition from a position in the bytebuffer that precedes remaining rows 
> in the previous partition.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18928) Simplify handling of Insufficient replies from Commit and Apply

2023-10-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18928:
--
  Fix Version/s: 5.0
Source Control Link: 
https://github.com/apache/cassandra-accord/commit/1e508d340935fef496f58606a14717bed59e8af4
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> Simplify handling of Insufficient replies from Commit and Apply
> ---
>
> Key: CASSANDRA-18928
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18928
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> Remove the use of Defer for Commit, and reply with Maximal Apply to 
> Insufficient Apply responses



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18928) Simplify handling of Insufficient replies from Commit and Apply

2023-10-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18928:
--
Status: Ready to Commit  (was: Review In Progress)

> Simplify handling of Insufficient replies from Commit and Apply
> ---
>
> Key: CASSANDRA-18928
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18928
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Remove the use of Defer for Commit, and reply with Maximal Apply to 
> Insufficient Apply responses



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18928) Simplify handling of Insufficient replies from Commit and Apply

2023-10-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18928:
--
Test and Documentation Plan: Existing test coverage
 Status: Patch Available  (was: Open)

PR: https://github.com/apache/cassandra-accord/pull/71

> Simplify handling of Insufficient replies from Commit and Apply
> ---
>
> Key: CASSANDRA-18928
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18928
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Remove the use of Defer for Commit, and reply with Maximal Apply to 
> Insufficient Apply responses



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-accord] branch trunk updated: CEP-15: Simplify handling of Insufficient replies from Commit and Apply

2023-10-16 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 1e508d34 CEP-15: Simplify handling of Insufficient replies from Commit 
and Apply
1e508d34 is described below

commit 1e508d340935fef496f58606a14717bed59e8af4
Author: Aleksey Yeschenko 
AuthorDate: Fri Oct 13 15:47:32 2023 +0100

CEP-15: Simplify handling of Insufficient replies from Commit and Apply

patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for
CASSANDRA-18928
---
 .../src/main/java/accord/coordinate/Persist.java   |  22 ++---
 .../src/main/java/accord/messages/Commit.java  |  15 ---
 .../src/main/java/accord/messages/Defer.java   | 107 -
 3 files changed, 11 insertions(+), 133 deletions(-)

diff --git a/accord-core/src/main/java/accord/coordinate/Persist.java 
b/accord-core/src/main/java/accord/coordinate/Persist.java
index 0607722f..9a132683 100644
--- a/accord-core/src/main/java/accord/coordinate/Persist.java
+++ b/accord-core/src/main/java/accord/coordinate/Persist.java
@@ -28,7 +28,6 @@ import accord.local.Node.Id;
 import accord.messages.Apply;
 import accord.messages.Apply.ApplyReply;
 import accord.messages.Callback;
-import accord.messages.Commit;
 import accord.messages.InformDurable;
 import accord.primitives.*;
 import accord.topology.Topologies;
@@ -37,7 +36,6 @@ import static 
accord.coordinate.tracking.RequestStatus.Success;
 import static accord.local.Status.Durability.Majority;
 import static accord.messages.Apply.executes;
 import static accord.messages.Apply.participates;
-import static accord.messages.Commit.Kind.Maximal;
 
 public class Persist implements Callback
 {
@@ -47,6 +45,8 @@ public class Persist implements Callback
 final Txn txn;
 final Timestamp executeAt;
 final Deps deps;
+final Writes writes;
+final Result result;
 final QuorumTracker tracker;
 final Set persistedOn;
 boolean isDone;
@@ -60,7 +60,7 @@ public class Persist implements Callback
 public static void persist(Node node, Topologies executes, TxnId txnId, 
FullRoute route, Txn txn, Timestamp executeAt, Deps deps, Writes writes, 
Result result)
 {
 Topologies participates = participates(node, route, txnId, executeAt, 
executes);
-Persist persist = new Persist(node, executes, txnId, route, txn, 
executeAt, deps);
+Persist persist = new Persist(node, executes, txnId, route, txn, 
executeAt, deps, writes, result);
 node.send(participates.nodes(), to -> Apply.applyMinimal(to, 
participates, executes, txnId, route, txn, executeAt, deps, writes, result), 
persist);
 }
 
@@ -68,7 +68,7 @@ public class Persist implements Callback
 {
 Topologies executes = executes(node, route, executeAt);
 Topologies participates = participates(node, route, txnId, executeAt, 
executes);
-Persist persist = new Persist(node, participates, txnId, route, txn, 
executeAt, deps);
+Persist persist = new Persist(node, participates, txnId, route, txn, 
executeAt, deps, writes, result);
 node.send(participates.nodes(), to -> Apply.applyMaximal(to, 
participates, executes, txnId, route, txn, executeAt, deps, writes, result), 
persist);
 }
 
@@ -76,19 +76,21 @@ public class Persist implements Callback
 {
 Topologies executes = executes(node, sendTo, executeAt);
 Topologies participates = participates(node, sendTo, txnId, executeAt, 
executes);
-Persist persist = new Persist(node, participates, txnId, route, txn, 
executeAt, deps);
+Persist persist = new Persist(node, participates, txnId, route, txn, 
executeAt, deps, writes, result);
 node.send(participates.nodes(), to -> Apply.applyMaximal(to, 
participates, executes, txnId, route, txn, executeAt, deps, writes, result), 
persist);
 }
 
-private Persist(Node node, Topologies topologies, TxnId txnId, 
FullRoute route, Txn txn, Timestamp executeAt, Deps deps)
+private Persist(Node node, Topologies topologies, TxnId txnId, 
FullRoute route, Txn txn, Timestamp executeAt, Deps deps, Writes writes, 
Result result)
 {
 this.node = node;
 this.txnId = txnId;
+this.route = route;
 this.txn = txn;
+this.executeAt = executeAt;
 this.deps = deps;
-this.route = route;
+this.writes = writes;
+this.result = result;
 this.tracker = new QuorumTracker(topologies);
-this.executeAt = executeAt;
 this.persistedOn = new HashSet<>();
 }
 
@@ -112,9 +114,7 @@ public class Persist implements Callback
 }
 break;
 case Insufficient:
-Topologies topologies = node.topology().preciseEpochs(route, 
txnId.epoch(), executeAt.epoch());
-// TODO

[jira] [Updated] (CASSANDRA-18928) Simplify handling of Insufficient replies from Commit and Apply

2023-10-13 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18928:
--
Change Category: Code Clarity
 Complexity: Normal
  Reviewers: Benedict Elliott Smith
 Status: Open  (was: Triage Needed)

> Simplify handling of Insufficient replies from Commit and Apply
> ---
>
> Key: CASSANDRA-18928
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18928
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Remove the use of Defer for Commit, and reply with Maximal Apply to 
> Insufficient Apply responses



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-18928) Simplify handling of Insufficient replies from Commit and Apply

2023-10-13 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-18928:
-

 Summary: Simplify handling of Insufficient replies from Commit and 
Apply
 Key: CASSANDRA-18928
 URL: https://issues.apache.org/jira/browse/CASSANDRA-18928
 Project: Cassandra
  Issue Type: Improvement
  Components: Accord
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko


Remove the use of Defer for Commit, and reply with Maximal Apply to 
Insufficient Apply responses



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch cep-15-accord updated (2c79de82a5 -> 718e24ab95)

2023-10-04 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a change to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


from 2c79de82a5 Fix AccordJournalTest and ConfigCompatibilityTest, and 
revert the sendMessageWithFailureCB() callback to printing just the repair 
failure reason in its error message
 add 718e24ab95 Fix Propagate serializer

No new revisions were added by this update.

Summary of changes:
 .../accord/serializers/FetchSerializers.java   | 22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18573) Minimise state kept in accord system tables by reusing state from message log

2023-10-04 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18573:
--
Resolution: Fixed
Status: Resolved  (was: Open)

> Minimise state kept in accord system tables by reusing state from message log
> -
>
> Key: CASSANDRA-18573
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18573
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Stop storing deps, partial txn, and writes in accord system table - fetch 
> these registers from the message log instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Comment Edited] (CASSANDRA-18573) Minimise state kept in accord system tables by reusing state from message log

2023-10-04 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769617#comment-17769617
 ] 

Aleksey Yeschenko edited comment on CASSANDRA-18573 at 10/4/23 10:36 AM:
-

cassandra-accord PR (reviewed and merged): 
https://github.com/apache/cassandra-accord/pull/62
cassandra commit: 
https://github.com/apache/cassandra/commit/1be9ad2a2e69193f7dcaa20351f20fb4ee4981e6


was (Author: iamaleksey):
cassandra-accord PR (reviewed and merged): 
https://github.com/apache/cassandra-accord/pull/62
cassandra PR: pending some dependency merges

> Minimise state kept in accord system tables by reusing state from message log
> -
>
> Key: CASSANDRA-18573
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18573
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Stop storing deps, partial txn, and writes in accord system table - fetch 
> these registers from the message log instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18888) Implement CommandStore state reloading on startup

2023-09-27 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-1:
--
Component/s: Accord

> Implement CommandStore state reloading on startup
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Implement CommandStore state reloading on startup. Selectively replay message 
> log to restore any missing rows in accord system tables that hadn't made it 
> to disk due to abnormal node termination, and rehydrate the progress log. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18888) Implement CommandStore state reloading on startup

2023-09-27 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-1:
--
Change Category: Semantic
 Complexity: Normal
 Status: Open  (was: Triage Needed)

> Implement CommandStore state reloading on startup
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Implement CommandStore state reloading on startup. Selectively replay message 
> log to restore any missing rows in accord system tables that hadn't made it 
> to disk due to abnormal node termination, and rehydrate the progress log. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-18888) Implement CommandStore state reloading on startup

2023-09-27 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-1:
-

 Summary: Implement CommandStore state reloading on startup
 Key: CASSANDRA-1
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1
 Project: Cassandra
  Issue Type: New Feature
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko


Implement CommandStore state reloading on startup. Selectively replay message 
log to restore any missing rows in accord system tables that hadn't made it to 
disk due to abnormal node termination, and rehydrate the progress log. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18573) Minimise state kept in accord system tables by reusing state from message log

2023-09-27 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769617#comment-17769617
 ] 

Aleksey Yeschenko commented on CASSANDRA-18573:
---

cassandra-accord PR (reviewed and merged): 
https://github.com/apache/cassandra-accord/pull/62
cassandra PR: pending some dependency merges

> Minimise state kept in accord system tables by reusing state from message log
> -
>
> Key: CASSANDRA-18573
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18573
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Stop storing deps, partial txn, and writes in accord system table - fetch 
> these registers from the message log instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18573) Minimise state kept in accord system tables by reusing state from message log

2023-09-27 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18573:
--
Description: Stop storing deps, partial txn, and writes in accord system 
table - fetch these registers from the message log instead.

> Minimise state kept in accord system tables by reusing state from message log
> -
>
> Key: CASSANDRA-18573
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18573
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Stop storing deps, partial txn, and writes in accord system table - fetch 
> these registers from the message log instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18573) Minimise state kept in accord system tables by reusing state from message log

2023-09-27 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18573:
--
Summary: Minimise state kept in accord system tables by reusing state from 
message log  (was: TBD)

> Minimise state kept in accord system tables by reusing state from message log
> -
>
> Key: CASSANDRA-18573
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18573
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18573) TBD

2023-09-27 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18573:
--
Change Category: Performance
 Complexity: Normal
  Reviewers: Ariel Weisberg
   Assignee: Aleksey Yeschenko
 Status: Open  (was: Triage Needed)

> TBD
> ---
>
> Key: CASSANDRA-18573
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18573
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-accord] branch trunk updated: CEP-15: Minimize transaction state kept in system tables (#62)

2023-09-25 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 79fc1ebf CEP-15: Minimize transaction state kept in system tables (#62)
79fc1ebf is described below

commit 79fc1ebf7db6aa5e616dbef1bc61b616fea3c2c6
Author: Aleksey Yeschenko 
AuthorDate: Mon Sep 25 16:07:44 2023 +0100

CEP-15: Minimize transaction state kept in system tables (#62)

* CEP-15: Minimize transaction state kept in system tables

patch by Aleksey Yeschenko; reviewed by Ariel Weisberg for CASSANDRA-18573
---
 .../src/main/java/accord/api/ProgressLog.java  |   3 +-
 accord-core/src/main/java/accord/api/Read.java |   1 +
 accord-core/src/main/java/accord/api/Update.java   |   1 +
 .../src/main/java/accord/coordinate/FetchData.java | 255 +
 .../java/accord/coordinate/RecoverWithRoute.java   |   8 +-
 .../src/main/java/accord/local/Command.java| 124 ++-
 accord-core/src/main/java/accord/local/Node.java   |  11 +-
 .../main/java/accord/local/SerializerSupport.java  | 413 +
 accord-core/src/main/java/accord/local/Status.java |   9 +-
 .../src/main/java/accord/messages/Apply.java   |  37 +-
 .../src/main/java/accord/messages/Commit.java  |  23 +-
 .../main/java/accord/messages/InformDurable.java   |  11 -
 .../{api/Read.java => messages/LocalMessage.java}  |  24 +-
 .../src/main/java/accord/messages/MessageType.java | 105 --
 .../src/main/java/accord/messages/Propagate.java   | 371 ++
 .../src/main/java/accord/primitives/Deps.java  |   2 +-
 .../main/java/accord/primitives/PartialDeps.java   |   9 +-
 .../main/java/accord/primitives/PartialTxn.java|  18 +-
 .../src/main/java/accord/primitives/Writes.java|   7 +-
 accord-core/src/test/java/accord/Utils.java|   2 +
 .../src/test/java/accord/impl/basic/Cluster.java   |   3 +-
 .../test/java/accord/impl/mock/MockCluster.java|   2 +
 .../java/accord/local/ImmutableCommandTest.java|   2 +-
 .../src/main/java/accord/maelstrom/Cluster.java|   3 +-
 .../src/main/java/accord/maelstrom/Main.java   |   3 +-
 25 files changed, 1079 insertions(+), 368 deletions(-)

diff --git a/accord-core/src/main/java/accord/api/ProgressLog.java 
b/accord-core/src/main/java/accord/api/ProgressLog.java
index 4ede480f..47244c17 100644
--- a/accord-core/src/main/java/accord/api/ProgressLog.java
+++ b/accord-core/src/main/java/accord/api/ProgressLog.java
@@ -142,8 +142,7 @@ public interface ProgressLog
 void executed(Command command, ProgressShard shard);
 
 /**
- * The transaction's outcome has been durably recorded (but not 
necessarily applied) at a quorum of all shards,
- * including at least those node's ids that are provided.
+ * The transaction's outcome has been durably recorded (but not 
necessarily applied) at a quorum of all shards.
  *
  * If this replica has not witnessed the outcome of the transaction, it 
should poll a majority of each shard
  * for its outcome.
diff --git a/accord-core/src/main/java/accord/api/Read.java 
b/accord-core/src/main/java/accord/api/Read.java
index b9eaf2a1..7def168c 100644
--- a/accord-core/src/main/java/accord/api/Read.java
+++ b/accord-core/src/main/java/accord/api/Read.java
@@ -32,4 +32,5 @@ public interface Read
 AsyncChain read(Seekable key, Txn.Kind kind, SafeCommandStore 
commandStore, Timestamp executeAt, DataStore store);
 Read slice(Ranges ranges);
 Read merge(Read other);
+default boolean isEqualOrFuller(Read other) { return true; }
 }
diff --git a/accord-core/src/main/java/accord/api/Update.java 
b/accord-core/src/main/java/accord/api/Update.java
index 8a56efcc..fa8493e5 100644
--- a/accord-core/src/main/java/accord/api/Update.java
+++ b/accord-core/src/main/java/accord/api/Update.java
@@ -36,4 +36,5 @@ public interface Update
 Write apply(Timestamp executeAt, @Nullable Data data);
 Update slice(Ranges ranges);
 Update merge(Update other);
+default boolean isEqualOrFuller(Update other) { return true; }
 }
diff --git a/accord-core/src/main/java/accord/coordinate/FetchData.java 
b/accord-core/src/main/java/accord/coordinate/FetchData.java
index 774df8ab..0188a0a7 100644
--- a/accord-core/src/main/java/accord/coordinate/FetchData.java
+++ b/accord-core/src/main/java/accord/coordinate/FetchData.java
@@ -15,37 +15,23 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package accord.coordinate;
 
 import java.util.function.BiConsumer;
 
-import accord.api.RoutingKey;
-import accord.local.Command;
-import accord.local.Commands;
 import accord.local.Node;
-import accord.local.PreLoadContext;
-import accord.local.SafeCommand;
-import accord.local.SafeCommandStore;
 import accord.local.Status;
 imp

[jira] [Commented] (CASSANDRA-8303) Create a capability limitation framework

2023-08-21 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-8303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17756841#comment-17756841
 ] 

Aleksey Yeschenko commented on CASSANDRA-8303:
--

This was supposed to be per-role. Guardrails affecting entire nodes.

> Create a capability limitation framework
> 
>
> Key: CASSANDRA-8303
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8303
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Legacy/Distributed Metadata
>Reporter: Anupam Arora
>Priority: Normal
> Fix For: 5.x
>
>
> In addition to our current Auth framework that acts as a white list, and 
> regulates access to data, functions, and roles, it would be beneficial to 
> have a different, capability limitation framework, that would be orthogonal 
> to Auth, and would act as a blacklist.
> Example uses:
> - take away the ability to TRUNCATE from all users but the admin (TRUNCATE 
> itself would still require MODIFY permission)
> - take away the ability to use ALLOW FILTERING from all users but 
> Spark/Hadoop (SELECT would still require SELECT permission)
> - take away the ability to use UNLOGGED BATCH from everyone (the operation 
> itself would still require MODIFY permission)
> - take away the ability to use certain consistency levels (make certain 
> tables LWT-only for all users, for example)
> Original description:
> Please provide a "strict mode" option in cassandra that will kick out any CQL 
> queries that are expensive, e.g. any query with ALLOWS FILTERING, 
> multi-partition queries, secondary index queries, etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18563:
--
Source Control Link: 
https://github.com/apache/cassandra/commit/bd33015f9310e15c7f7e6b3938f564dd20050466
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

Committed as [bd33015 
|https://github.com/apache/cassandra/commit/bd33015f9310e15c7f7e6b3938f564dd20050466]
 to cassandra only, cheers.

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
> persistence from system tables to {{AccordJournal}}. The switch to write-back 
> caching should allow to bypass writes to the system tables entirely for some 
> of the transactions.
> Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to 
> load an object could cause entries to be forever stuck in {{PENDING}} state 
> because it would never reach the code path that submits the load runnables to 
> the executor (that is now the job of the cache). Also switched the list 
> implementation from a hand-rolled ad-hoc one to the pre-existing 
> {{IntrusiveLinkedList}}, plus various simplifications and cleanup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18563:
--
Status: Review In Progress  (was: Patch Available)

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
> persistence from system tables to {{AccordJournal}}. The switch to write-back 
> caching should allow to bypass writes to the system tables entirely for some 
> of the transactions.
> Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to 
> load an object could cause entries to be forever stuck in {{PENDING}} state 
> because it would never reach the code path that submits the load runnables to 
> the executor (that is now the job of the cache). Also switched the list 
> implementation from a hand-rolled ad-hoc one to the pre-existing 
> {{IntrusiveLinkedList}}, plus various simplifications and cleanup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18563:
--
Status: Ready to Commit  (was: Review In Progress)

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
> persistence from system tables to {{AccordJournal}}. The switch to write-back 
> caching should allow to bypass writes to the system tables entirely for some 
> of the transactions.
> Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to 
> load an object could cause entries to be forever stuck in {{PENDING}} state 
> because it would never reach the code path that submits the load runnables to 
> the executor (that is now the job of the cache). Also switched the list 
> implementation from a hand-rolled ad-hoc one to the pre-existing 
> {{IntrusiveLinkedList}}, plus various simplifications and cleanup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-15 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733169#comment-17733169
 ] 

Aleksey Yeschenko commented on CASSANDRA-18563:
---

Accord PR with a change to {{IntrusiveLinkedList}}: 
https://github.com/apache/cassandra-accord/pull/51

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
> persistence from system tables to {{AccordJournal}}. The switch to write-back 
> caching should allow to bypass writes to the system tables entirely for some 
> of the transactions.
> Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to 
> load an object could cause entries to be forever stuck in {{PENDING}} state 
> because it would never reach the code path that submits the load runnables to 
> the executor (that is now the job of the cache). Also switched the list 
> implementation from a hand-rolled ad-hoc one to the pre-existing 
> {{IntrusiveLinkedList}}, plus various simplifications and cleanup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-18573) TBD

2023-06-07 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-18573:
-

 Summary: TBD
 Key: CASSANDRA-18573
 URL: https://issues.apache.org/jira/browse/CASSANDRA-18573
 Project: Cassandra
  Issue Type: Improvement
  Components: Accord
Reporter: Aleksey Yeschenko






--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-07 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18563:
--
Description: 
Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
persistence from system tables to {{AccordJournal}}. The switch to write-back 
caching should allow to bypass writes to the system tables entirely for some of 
the transactions.

Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to load 
an object could cause entries to be forever stuck in {{PENDING}} state because 
it would never reach the code path that submits the load runnables to the 
executor (that is now the job of the cache). Also switched the list 
implementation from a hand-rolled ad-hoc one to the pre-existing 
{{IntrusiveLinkedList}}, plus various simplifications and cleanup.

  was:
Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
persistence from system tables to {{AccordJournal}}. The switch to write-back 
caching should allow to bypass writes to the system tables entirely for some of 
the transactions.

Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to load 
an object could cause entries to be forever stuck in {{PENDING}} state because 
it would never reach the code path that submits the load runnables to the 
executor (that is now the job of the cache). Also switched the list 
implementation from a hand-rolled adhoc one to the pre-existing 
{{IntrusiveLinkedList}}, plus various simplifications and cleanup.


> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
> persistence from system tables to {{AccordJournal}}. The switch to write-back 
> caching should allow to bypass writes to the system tables entirely for some 
> of the transactions.
> Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to 
> load an object could cause entries to be forever stuck in {{PENDING}} state 
> because it would never reach the code path that submits the load runnables to 
> the executor (that is now the job of the cache). Also switched the list 
> implementation from a hand-rolled ad-hoc one to the pre-existing 
> {{IntrusiveLinkedList}}, plus various simplifications and cleanup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-07 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18563:
--
Description: 
Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
persistence from system tables to {{AccordJournal}}. The switch to write-back 
caching should allow to bypass writes to the system tables entirely for some of 
the transactions.

Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to load 
an object could cause entries to be forever stuck in {{PENDING}} state because 
it would never reach the code path that submits the load runnables to the 
executor (that is now the job of the cache). Also switched the list 
implementation from a hand-rolled adhoc one to the pre-existing 
{{IntrusiveLinkedList}}, plus various simplifications and cleanup.

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>
> Pre-requisite work for soon to go up PRs that continue shifting the bulk of 
> persistence from system tables to {{AccordJournal}}. The switch to write-back 
> caching should allow to bypass writes to the system tables entirely for some 
> of the transactions.
> Additionally fixes some bugs in the cache, e.g. {{AsyncLoader}} failing to 
> load an object could cause entries to be forever stuck in {{PENDING}} state 
> because it would never reach the code path that submits the load runnables to 
> the executor (that is now the job of the cache). Also switched the list 
> implementation from a hand-rolled adhoc one to the pre-existing 
> {{IntrusiveLinkedList}}, plus various simplifications and cleanup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-07 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17730124#comment-17730124
 ] 

Aleksey Yeschenko commented on CASSANDRA-18563:
---

PR: [https://github.com/apache/cassandra/pull/2395]

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-07 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18563:
--
Test and Documentation Plan: unit tests
 Status: Patch Available  (was: Open)

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-07 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18563:
--
Change Category: Performance
 Complexity: Normal
Component/s: Accord
  Fix Version/s: 5.0
  Reviewers: Blake Eggleston
 Status: Open  (was: Triage Needed)

> Convert AccordStateCache cache from write-through to write-back
> ---
>
> Key: CASSANDRA-18563
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-18563) Convert AccordStateCache cache from write-through to write-back

2023-06-02 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-18563:
-

 Summary: Convert AccordStateCache cache from write-through to 
write-back
 Key: CASSANDRA-18563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-18563
 Project: Cassandra
  Issue Type: Improvement
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko






--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18561) Extend Accord MessageType with a side effect flag

2023-06-02 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18561:
--
Test and Documentation Plan: Mechanical change
 Status: Patch Available  (was: In Progress)

> Extend Accord MessageType with a side effect flag
> -
>
> Key: CASSANDRA-18561
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18561
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Low
> Fix For: 5.0
>
>
> Tiny change to make it easier for implementations to decide if a protocol 
> message should be persisted to the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18561) Extend Accord MessageType with a side effect flag

2023-06-02 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18561:
--
Status: Ready to Commit  (was: Review In Progress)

> Extend Accord MessageType with a side effect flag
> -
>
> Key: CASSANDRA-18561
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18561
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Low
> Fix For: 5.0
>
>
> Tiny change to make it easier for implementations to decide if a protocol 
> message should be persisted to the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18561) Extend Accord MessageType with a side effect flag

2023-06-02 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18561:
--
Source Control Link: 
https://github.com/apache/cassandra-accord/commit/8830d97ba517fb2d0f7f22e8e6b886a98839e694
 
https://github.com/apache/cassandra/commit/2230fb55cd0c0ee9c4d0732ab1a5ad2ffb28e15f
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> Extend Accord MessageType with a side effect flag
> -
>
> Key: CASSANDRA-18561
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18561
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Low
> Fix For: 5.0
>
>
> Tiny change to make it easier for implementations to decide if a protocol 
> message should be persisted to the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18561) Extend Accord MessageType with a side effect flag

2023-06-02 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18561:
--
Change Category: Code Clarity
 Complexity: Low Hanging Fruit
Component/s: Accord
  Fix Version/s: 5.0
  Reviewers: Benedict Elliott Smith
   Assignee: Aleksey Yeschenko
   Priority: Low  (was: Normal)
 Status: Open  (was: Triage Needed)

> Extend Accord MessageType with a side effect flag
> -
>
> Key: CASSANDRA-18561
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18561
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Low
> Fix For: 5.0
>
>
> Tiny change to make it easier for implementations to decide if a protocol 
> message should be persisted to the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18561) Extend Accord MessageType with a side effect flag

2023-06-02 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18561:
--
Status: Review In Progress  (was: Patch Available)

> Extend Accord MessageType with a side effect flag
> -
>
> Key: CASSANDRA-18561
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18561
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Low
> Fix For: 5.0
>
>
> Tiny change to make it easier for implementations to decide if a protocol 
> message should be persisted to the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18561) Extend Accord MessageType with a side effect flag

2023-06-02 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17728694#comment-17728694
 ] 

Aleksey Yeschenko commented on CASSANDRA-18561:
---

Accord PR: [https://github.com/apache/cassandra-accord/pull/48]

Cassandra PR: [https://github.com/apache/cassandra/pull/2383]

> Extend Accord MessageType with a side effect flag
> -
>
> Key: CASSANDRA-18561
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18561
> Project: Cassandra
>  Issue Type: Improvement
>    Reporter: Aleksey Yeschenko
>Priority: Normal
>
> Tiny change to make it easier for implementations to decide if a protocol 
> message should be persisted to the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch cep-15-accord updated: CEP-15: Extend Accord MessageType with a side effect flag

2023-06-02 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-15-accord by this push:
 new 2230fb55cd CEP-15: Extend Accord MessageType with a side effect flag
2230fb55cd is described below

commit 2230fb55cd0c0ee9c4d0732ab1a5ad2ffb28e15f
Author: Aleksey Yeschenko 
AuthorDate: Fri Jun 2 11:45:41 2023 +0100

CEP-15: Extend Accord MessageType with a side effect flag

patch by Aleksey Yeschenko; reviewed by Benedic Elliott Smith for
CASSANDRA-18561
---
 modules/accord   |  2 +-
 src/java/org/apache/cassandra/net/Verb.java  | 14 +++---
 .../apache/cassandra/service/accord/AccordJournal.java   | 10 +-
 .../cassandra/service/accord/AccordMessageSink.java  | 16 
 .../cassandra/service/accord/AccordMessageSinkTest.java  |  2 +-
 5 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/modules/accord b/modules/accord
index 3d0ff07cd5..8830d97ba5 16
--- a/modules/accord
+++ b/modules/accord
@@ -1 +1 @@
-Subproject commit 3d0ff07cd5c7db43390b85afa593e6f76471d886
+Subproject commit 8830d97ba517fb2d0f7f22e8e6b886a98839e694
diff --git a/src/java/org/apache/cassandra/net/Verb.java 
b/src/java/org/apache/cassandra/net/Verb.java
index 781261e655..c9a678a2ca 100644
--- a/src/java/org/apache/cassandra/net/Verb.java
+++ b/src/java/org/apache/cassandra/net/Verb.java
@@ -229,8 +229,8 @@ public enum Verb
 
 // accord
 ACCORD_SIMPLE_RSP   (119, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> EnumSerializer.simpleReply,   RESPONSE_HANDLER   
 ),
-ACCORD_PREACCEPT_RSP(121, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> PreacceptSerializers.reply,   RESPONSE_HANDLER   
 ),
-ACCORD_PREACCEPT_REQ(120, P2, writeTimeout, IMMEDIATE, 
 () -> PreacceptSerializers.request, () -> 
AccordService.instance().verbHandler(), ACCORD_PREACCEPT_RSP  ),
+ACCORD_PRE_ACCEPT_RSP   (121, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> PreacceptSerializers.reply,   RESPONSE_HANDLER   
 ),
+ACCORD_PRE_ACCEPT_REQ   (120, P2, writeTimeout, IMMEDIATE, 
 () -> PreacceptSerializers.request, () -> 
AccordService.instance().verbHandler(), ACCORD_PRE_ACCEPT_RSP ),
 ACCORD_ACCEPT_RSP   (124, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> AcceptSerializers.reply,  RESPONSE_HANDLER   
 ),
 ACCORD_ACCEPT_REQ   (122, P2, writeTimeout, IMMEDIATE, 
 () -> AcceptSerializers.request,() -> 
AccordService.instance().verbHandler(), ACCORD_ACCEPT_RSP ),
 ACCORD_ACCEPT_INVALIDATE_REQ(123, P2, writeTimeout, IMMEDIATE, 
 () -> AcceptSerializers.invalidate, () -> 
AccordService.instance().verbHandler(), ACCORD_ACCEPT_RSP ),
@@ -240,13 +240,13 @@ public enum Verb
 ACCORD_COMMIT_INVALIDATE_REQ(126, P2, writeTimeout, IMMEDIATE, 
 () -> CommitSerializers.invalidate, () -> 
AccordService.instance().verbHandler()),
 ACCORD_APPLY_RSP(130, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> ApplySerializers.reply,   RESPONSE_HANDLER   
 ),
 ACCORD_APPLY_REQ(129, P2, writeTimeout, IMMEDIATE, 
 () -> ApplySerializers.request, () -> 
AccordService.instance().verbHandler(), ACCORD_APPLY_RSP  ),
-ACCORD_RECOVER_RSP  (132, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> RecoverySerializers.reply,RESPONSE_HANDLER   
 ),
-ACCORD_RECOVER_REQ  (131, P2, writeTimeout, IMMEDIATE, 
 () -> RecoverySerializers.request,  () -> 
AccordService.instance().verbHandler(), ACCORD_RECOVER_RSP),
+ACCORD_BEGIN_RECOVER_RSP(132, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> RecoverySerializers.reply,RESPONSE_HANDLER   
 ),
+ACCORD_BEGIN_RECOVER_REQ(131, P2, writeTimeout, IMMEDIATE, 
 () -> RecoverySerializers.request,  () -> 
AccordService.instance().verbHandler(), ACCORD_BEGIN_RECOVER_RSP  ),
 ACCORD_BEGIN_INVALIDATE_RSP (134, P2, writeTimeout, REQUEST_RESPONSE,  
 () -> BeginInvalidationSerializers.reply,   RESPONSE_HANDLER   
 

[cassandra-accord] branch trunk updated: CEP-15: Extend Accord MessageType with a side effect flag

2023-06-02 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 8830d97b CEP-15: Extend Accord MessageType with a side effect flag
8830d97b is described below

commit 8830d97ba517fb2d0f7f22e8e6b886a98839e694
Author: Aleksey Yeschenko 
AuthorDate: Fri Jun 2 11:00:03 2023 +0100

CEP-15: Extend Accord MessageType with a side effect flag

patch by Aleksey Yeschenko; reviewed by Benedic Elliott Smith for
CASSANDRA-18561
---
 .../src/main/java/accord/messages/Commit.java  |  2 +-
 .../main/java/accord/messages/InformOfTxnId.java   |  2 +-
 .../src/main/java/accord/messages/MessageType.java | 66 +-
 .../src/main/java/accord/messages/PreAccept.java   |  4 +-
 4 files changed, 42 insertions(+), 32 deletions(-)

diff --git a/accord-core/src/main/java/accord/messages/Commit.java 
b/accord-core/src/main/java/accord/messages/Commit.java
index 91732b41..8d21c9e0 100644
--- a/accord-core/src/main/java/accord/messages/Commit.java
+++ b/accord-core/src/main/java/accord/messages/Commit.java
@@ -288,7 +288,7 @@ public class Commit extends TxnRequest
 @Override
 public MessageType type()
 {
-return MessageType.COMMIT_INVALIDATE;
+return MessageType.COMMIT_INVALIDATE_REQ;
 }
 
 @Override
diff --git a/accord-core/src/main/java/accord/messages/InformOfTxnId.java 
b/accord-core/src/main/java/accord/messages/InformOfTxnId.java
index b29c72c1..dbb65e4b 100644
--- a/accord-core/src/main/java/accord/messages/InformOfTxnId.java
+++ b/accord-core/src/main/java/accord/messages/InformOfTxnId.java
@@ -73,7 +73,7 @@ public class InformOfTxnId extends 
AbstractEpochRequest implements Reques
 @Override
 public MessageType type()
 {
-return MessageType.INFORM_TXNID_REQ;
+return MessageType.INFORM_OF_TXN_REQ;
 }
 
 @Override
diff --git a/accord-core/src/main/java/accord/messages/MessageType.java 
b/accord-core/src/main/java/accord/messages/MessageType.java
index 5de5cdb4..f5361e6e 100644
--- a/accord-core/src/main/java/accord/messages/MessageType.java
+++ b/accord-core/src/main/java/accord/messages/MessageType.java
@@ -15,37 +15,47 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package accord.messages;
 
 /**
- * meant to assist implementations map accord messages to their own messaging 
systems
+ * Meant to assist implementations map accord messages to their own messaging 
systems.
  */
 public enum MessageType
 {
-SIMPLE_RSP,
-PREACCEPT_REQ,
-PREACCEPT_RSP,
-ACCEPT_REQ,
-ACCEPT_RSP,
-ACCEPT_INVALIDATE_REQ,
-GET_DEPS_REQ,
-GET_DEPS_RSP,
-COMMIT_REQ,
-COMMIT_INVALIDATE,
-APPLY_REQ,
-APPLY_RSP,
-READ_REQ,
-READ_RSP,
-BEGIN_RECOVER_REQ,
-BEGIN_RECOVER_RSP,
-BEGIN_INVALIDATE_REQ,
-BEGIN_INVALIDATE_RSP,
-WAIT_ON_COMMIT_REQ,
-WAIT_ON_COMMIT_RSP,
-INFORM_TXNID_REQ,
-INFORM_DURABLE_REQ,
-INFORM_HOME_DURABLE_REQ,
-CHECK_STATUS_REQ,
-CHECK_STATUS_RSP,
-}
+SIMPLE_RSP  (false),
+PRE_ACCEPT_REQ  (true ),
+PRE_ACCEPT_RSP  (false),
+ACCEPT_REQ  (true ),
+ACCEPT_RSP  (false),
+ACCEPT_INVALIDATE_REQ   (true ),
+GET_DEPS_REQ(false),
+GET_DEPS_RSP(false),
+COMMIT_REQ  (true ),
+COMMIT_INVALIDATE_REQ   (true ),
+APPLY_REQ   (true ),
+APPLY_RSP   (false),
+READ_REQ(false),
+READ_RSP(false),
+BEGIN_RECOVER_REQ   (true ),
+BEGIN_RECOVER_RSP   (false),
+BEGIN_INVALIDATE_REQ(true ),
+BEGIN_INVALIDATE_RSP(false),
+WAIT_ON_COMMIT_REQ  (false),
+WAIT_ON_COMMIT_RSP  (false),
+INFORM_OF_TXN_REQ   (true ),
+INFORM_DURABLE_REQ  (true ),
+INFORM_HOME_DURABLE_REQ (true ),
+CHECK_STATUS_REQ(false),
+CHECK_STATUS_RSP(false),
+;
+
+/**
+ * If true, indicates that processing of the message has important side 
effects.
+ */
+public final boolean hasSideEffects;
+
+MessageType(boolean hasSideEffects)
+{
+this.hasSideEffects = hasSideEffects;
+}
+}
\ No newline at end of file
diff --git a/accord-core/src/main/java/accord/messages/PreAccept.java 
b/accord-core/src/main/java/accord/messages/PreAccept.java
index 5b482169..38f96b51 100644
--- a/accord-core/src/main/java/accord/messages/PreAccept.java
+++ b/accord-core/src/main/java/accord/messages/PreAccept.java
@@ -148,7 +148,7 @@ public class PreAccept extends 
WithUnsynced
 @Override
 public MessageType type()
 {
-return MessageType.PREACCEPT_REQ;
+return MessageType.PRE_ACCEPT_REQ

[jira] [Created] (CASSANDRA-18561) Extend Accord MessageType with a side effect flag

2023-06-02 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-18561:
-

 Summary: Extend Accord MessageType with a side effect flag
 Key: CASSANDRA-18561
 URL: https://issues.apache.org/jira/browse/CASSANDRA-18561
 Project: Cassandra
  Issue Type: Improvement
Reporter: Aleksey Yeschenko


Tiny change to make it easier for implementations to decide if a protocol 
message should be persisted to the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-05-15 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18344:
--
Reviewers: David Capwell  (was: Benedict Elliott Smith, David Capwell)

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.x
>
>  Time Spent: 17h
>  Remaining Estimate: 0h
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-05-15 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18344:
--
Source Control Link: 
https://github.com/apache/cassandra/commit/6d1d1146a79bda571d94ba5618d00687f11e03fe
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.x
>
>  Time Spent: 17h
>  Remaining Estimate: 0h
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-05-15 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18344:
--
Status: Ready to Commit  (was: Review In Progress)

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 5.x
>
>  Time Spent: 17h
>  Remaining Estimate: 0h
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-04-05 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18344:
--
Reviewers: Benedict Elliott Smith

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-18421) TBD

2023-04-03 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-18421:
-

 Summary: TBD
 Key: CASSANDRA-18421
 URL: https://issues.apache.org/jira/browse/CASSANDRA-18421
 Project: Cassandra
  Issue Type: New Feature
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko


TBD



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-03-31 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17707343#comment-17707343
 ] 

Aleksey Yeschenko commented on CASSANDRA-18344:
---

[https://github.com/apache/cassandra/pull/2256]

Pre-requisite patch-set for several upcoming Accord changes.

Introduces an append-only journal for Accord messages. The journal supports 
invalidating individual entries by id and sets of owners, and looking up 
records by id, among other things.

Several complete/near-complete parts of the generic journal implementation have 
been temporarily taken out until we need them (soon, once bootstrap/state 
reclamation are implemented).

These include:
 * invalidation support (in memory and on-disk implementations), and
 * segment compaction (not needed without invalidations)

PreAccept, Accept, Commit, and Apply are now written to a journal but aren't 
yet being read/used.

Test coverage needs and comments around certain areas need work before commit. 
Coming soon.

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-03-31 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18344:
--
Change Category: Performance
 Complexity: Normal
 Status: Open  (was: Triage Needed)

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-03-31 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18344:
--
Component/s: Accord

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Accord
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18344) Store PreAccept, Accept, Commit, and Apply in a durable log before processing by CommandStores

2023-03-31 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18344:
--
Description: 
Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
CommandStore will then processes the messages in write order.
 
This is a prerequisite JIRA for several incoming improvements, such as reducing 
the data we store in system tables, making command stores and progress log 
persistent, simplifying caching.
The journal supports invalidating individual entries by id and sets of owners, 
and looking up records by id, both needed for near-future Accord work.
 
Several complete/near-complete parts of the generic journal implementation have 
been temporarily taken out until we need them (soon, once bootstrap/state 
reclamation are implemented).
These include invalidation support (in memory and on-disk implementations), and 
segment compaction (not needed without invalidations).
 

  was:TBD

Summary: Store PreAccept, Accept, Commit, and Apply in a durable log 
before processing by CommandStores  (was: TBD)

> Store PreAccept, Accept, Commit, and Apply in a durable log before processing 
> by CommandStores
> --
>
> Key: CASSANDRA-18344
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
> Project: Cassandra
>  Issue Type: New Feature
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Write PreAccept, Accept, Commit, and Apply messages durably to a journal.
> CommandStore will then processes the messages in write order.
>  
> This is a prerequisite JIRA for several incoming improvements, such as 
> reducing the data we store in system tables, making command stores and 
> progress log persistent, simplifying caching.
> The journal supports invalidating individual entries by id and sets of 
> owners, and looking up records by id, both needed for near-future Accord work.
>  
> Several complete/near-complete parts of the generic journal implementation 
> have been temporarily taken out until we need them (soon, once 
> bootstrap/state reclamation are implemented).
> These include invalidation support (in memory and on-disk implementations), 
> and segment compaction (not needed without invalidations).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18304) hinted_handoff_enabled=false is not honored

2023-03-22 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18304:
--
Reviewers: Aleksey Yeschenko, Stefan Miklosovic, Aleksey Yeschenko  (was: 
Aleksey Yeschenko, Stefan Miklosovic)
   Aleksey Yeschenko, Stefan Miklosovic, Aleksey Yeschenko  (was: 
Aleksey Yeschenko, Stefan Miklosovic)
   Status: Review In Progress  (was: Patch Available)

> hinted_handoff_enabled=false is not honored
> ---
>
> Key: CASSANDRA-18304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18304
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Normal
> Fix For: 4.1.x, 5.x
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> I've had some dtests with disabled hints failing.
> After investigation it seems that CASSANDRA-17164 moved hint submission on 
> timeout from 
> [RequestCallbacks.onExpired|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-b73c13ea8cae91a215495917fe5e90d55c9f4a283f9e053110992bc9a60004b8L176]
>  to 
> [AbstractWriteResponseHandler.onFailure|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-3b202de0d077638bede7bf4076a15eb4d483b717f955f11e743efb8d27c6eb1dR285],
>  but it no longer checks if {{CallbackInfo.shouldHint}} which checks for 
> {{StorageProxy.shouldHint}} which ultimately checks if 
> {{{}hinted_handoff_enabled=true{}}}.
> This could cause some tests which expect hints to be disabled to fail 
> intermittently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18304) hinted_handoff_enabled=false is not honored

2023-03-22 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17703703#comment-17703703
 ] 

Aleksey Yeschenko commented on CASSANDRA-18304:
---

+1. I can't say that the code around hint submission is currently correct, but 
the changes are strictly an improvement, and don't make anything worse.

> hinted_handoff_enabled=false is not honored
> ---
>
> Key: CASSANDRA-18304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18304
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Normal
> Fix For: 4.1.x, 5.x
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> I've had some dtests with disabled hints failing.
> After investigation it seems that CASSANDRA-17164 moved hint submission on 
> timeout from 
> [RequestCallbacks.onExpired|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-b73c13ea8cae91a215495917fe5e90d55c9f4a283f9e053110992bc9a60004b8L176]
>  to 
> [AbstractWriteResponseHandler.onFailure|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-3b202de0d077638bede7bf4076a15eb4d483b717f955f11e743efb8d27c6eb1dR285],
>  but it no longer checks if {{CallbackInfo.shouldHint}} which checks for 
> {{StorageProxy.shouldHint}} which ultimately checks if 
> {{{}hinted_handoff_enabled=true{}}}.
> This could cause some tests which expect hints to be disabled to fail 
> intermittently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18304) hinted_handoff_enabled=false is not honored

2023-03-22 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18304:
--
Status: Ready to Commit  (was: Review In Progress)

> hinted_handoff_enabled=false is not honored
> ---
>
> Key: CASSANDRA-18304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18304
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Normal
> Fix For: 4.1.x, 5.x
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> I've had some dtests with disabled hints failing.
> After investigation it seems that CASSANDRA-17164 moved hint submission on 
> timeout from 
> [RequestCallbacks.onExpired|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-b73c13ea8cae91a215495917fe5e90d55c9f4a283f9e053110992bc9a60004b8L176]
>  to 
> [AbstractWriteResponseHandler.onFailure|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-3b202de0d077638bede7bf4076a15eb4d483b717f955f11e743efb8d27c6eb1dR285],
>  but it no longer checks if {{CallbackInfo.shouldHint}} which checks for 
> {{StorageProxy.shouldHint}} which ultimately checks if 
> {{{}hinted_handoff_enabled=true{}}}.
> This could cause some tests which expect hints to be disabled to fail 
> intermittently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch trunk updated: Fix trunk CHANGES.txt

2023-03-22 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 4138dd697a Fix trunk CHANGES.txt
4138dd697a is described below

commit 4138dd697a1c6f3430b99f8b3feb4386d31f90ac
Author: Aleksey Yeschenko 
AuthorDate: Wed Mar 22 14:49:55 2023 +

Fix trunk CHANGES.txt
---
 CHANGES.txt | 56 +---
 1 file changed, 33 insertions(+), 23 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 6d234a7055..27a15725ca 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -121,9 +121,13 @@
  * Add new CQL function maxWritetime (CASSANDRA-17425)
  * Add guardrail for ALTER TABLE ADD / DROP / REMOVE column operations 
(CASSANDRA-17495)
  * Rename DisableFlag class to EnableFlag on guardrails (CASSANDRA-17544)
-Merged from 4.1:
+
+4.1.2
+
+
+4.1.1
  * Deprecate org.apache.cassandra.hadoop code (CASSANDRA-16984)
- * Fix too early schema version change in system local table (CASSANDRA-18291)
+ * Fix too early schema version change in sysem local table (CASSANDRA-18291)
  * Fix copying of JAR of a trigger to temporary file (CASSANDRA-18264)
  * Fix possible NoSuchFileException when removing a snapshot (CASSANDRA-18211)
  * PaxosPrepare may add instances to the Electorate that are not in gossip 
(CASSANDRA-18194)
@@ -166,13 +170,39 @@ Merged from 3.0:
 
 4.1.0
  * Fix ContentionStrategy backoff and Clock.waitUntil (CASSANDRA-18086)
+Merged from 4.0:
+Merged from 3.11:
+Merged from 3.0:
+ * Fix incorrect resource name in LIST PERMISSION output (CASSANDRA-17848)
+ * Suppress CVE-2022-41854 and similar (CASSANDRA-18083)
+
+
+4.1-rc1
  * Avoid schema mismatch problems on memtable API misconfiguration 
(CASSANDRA-18040)
  * Start Paxos auto repair in CassandraDaemon (CASSANDRA-18029)
- * Fix error message about type hints (CASSANDRA-17915)
  * Restore streaming_keep_alive_period on the netty control streaming channel 
(CASSANDRA-17768)
  * Move Schema.FORCE_LOAD_KEYSPACES and Schema.FORCE_LOAD_KEYSPACES_PROP to 
CassandraRelevantProps (CASSANDRA-17783)
  * Add --resolve-ip option to nodetool gossipinfo (CASSANDRA-17934)
  * Allow pre-V5 global limit on bytes in flight to revert to zero 
asynchronously in RateLimitingTest (CASSANDRA-17927)
+Merged from 4.0:
+ * Harden parsing of boolean values in CQL in PropertyDefinitions 
(CASSANDRA-17878)
+ * Fix error message about type hints (CASSANDRA-17915)
+ * Fix possible race condition on repair snapshots (CASSANDRA-17955)
+ * Fix ASM bytecode version inconsistency (CASSANDRA-17873)
+ * Remove empty cq4 files in log directory to not fail the startup of BinLog 
(CASSANDRA-17933)
+ * Fix multiple BufferPool bugs (CASSANDRA-16681)
+ * Fix StorageService.getNativeaddress handling of IPv6 addresses 
(CASSANDRA-17945)
+Merged from 3.11:
+ * Fix Splitter sometimes creating more splits than requested (CASSANDRA-18013)
+ * Suppress CVE-2022-42003 and CVE-2022-42004 (CASSANDRA-17966)
+ * Make LongBufferPoolTest insensitive to timing (CASSANDRA-16681)
+Merged from 3.0:
+ * Fix running Ant rat targets without git (CASSANDRA-17974)
+ * Harden JMX by resolving beanshooter issues (CASSANDRA-17921)
+ * Suppress CVE-2019-2684 (CASSANDRA-17965)
+ * Fix auto-completing "WITH" when creating a materialized view 
(CASSANDRA-17879)
+
+4.1-beta1
  * We should not emit deprecation warning on startup for 
`key_cache_save_period`, `row_cache_save_period`, `counter_cache_save_period` 
(CASSANDRA-17904)
  * upsert with adder support is not consistent with numbers and strings in LWT 
(CASSANDRA-17857)
  * Fix race and return after failing connections (CASSANDRA-17618)
@@ -202,13 +232,6 @@ Merged from 3.0:
  * Revert removal of withBufferSizeInMB(int size) in CQLSSTableWriter.Builder 
class and deprecate it in favor of withBufferSizeInMiB(int size) 
(CASSANDRA-17675)
  * Remove expired snapshots of dropped tables after restart (CASSANDRA-17619)
 Merged from 4.0:
- * Restore internode custom tracing on 4.0's new messaging system 
(CASSANDRA-17981)
- * Harden parsing of boolean values in CQL in PropertyDefinitions 
(CASSANDRA-17878)
- * Fix possible race condition on repair snapshots (CASSANDRA-17955)
- * Fix ASM bytecode version inconsistency (CASSANDRA-17873)
- * Remove empty cq4 files in log directory to not fail the startup of BinLog 
(CASSANDRA-17933)
- * Fix multiple BufferPool bugs (CASSANDRA-16681)
- * Fix StorageService.getNativeaddress handling of IPv6 addresses 
(CASSANDRA-17945)
  * Mitigate direct buffer memory OOM on replacements (CASSANDRA-17895)
  * Fix repair failure on assertion if two peers have overlapping mismatching 
ranges (CASSANDRA-17900)
  * Better handle null state in Gossip schema migration to avoid NPE 
(CASSANDRA-17864)
@@ -231,23 +254,11 @@ Merged from 4.0:
  * Ensure FileStreamTask cannot compromise shared channel proxy for system 

[jira] [Created] (CASSANDRA-18344) TBD

2023-03-20 Thread Aleksey Yeschenko (Jira)
Aleksey Yeschenko created CASSANDRA-18344:
-

 Summary: TBD
 Key: CASSANDRA-18344
 URL: https://issues.apache.org/jira/browse/CASSANDRA-18344
 Project: Cassandra
  Issue Type: New Feature
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko


TBD



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18331) Extend implicit allow-filtering to clustering keys as well

2023-03-15 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17700631#comment-17700631
 ] 

Aleksey Yeschenko commented on CASSANDRA-18331:
---

Sure. +1d with a small nit mentioned. Feel free to ignore it or change on 
commit. No need to rerun CI.

> Extend implicit allow-filtering to clustering keys as well
> --
>
> Key: CASSANDRA-18331
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18331
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL/Semantics
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Low
> Fix For: 5.x
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> This was overlooked in CASSANDRA-18238. 
> We should be able to do selects on vtables not only when selecting on regular 
> columns but also on clustering ones. Currently we can do that on regulars 
> only.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18304) hinted_handoff_enabled=false is not honored

2023-03-09 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17698453#comment-17698453
 ] 

Aleksey Yeschenko commented on CASSANDRA-18304:
---

As for the {{shouldHint()}} check, that could easily live in 
{{{}AbstractWriteResponseHandler#onFailure(){}}}, which would be a more direct 
translation of previous logic, without risk of unintended consequences of 
introducing filtering to the {{StorageProxy}} method.

 {code}
if (hintOnFailure != null && 
StorageProxy.shouldHint(replicaPlan.lookup(from)))
{
StorageProxy.submitHint(hintOnFailure.get(), 
replicaPlan.lookup(from), null);
}
{code}

> hinted_handoff_enabled=false is not honored
> ---
>
> Key: CASSANDRA-18304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18304
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Normal
> Fix For: 4.1.x, 5.x
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> I've had some dtests with disabled hints failing.
> After investigation it seems that CASSANDRA-17164 moved hint submission on 
> timeout from 
> [RequestCallbacks.onExpired|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-b73c13ea8cae91a215495917fe5e90d55c9f4a283f9e053110992bc9a60004b8L176]
>  to 
> [AbstractWriteResponseHandler.onFailure|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-3b202de0d077638bede7bf4076a15eb4d483b717f955f11e743efb8d27c6eb1dR285],
>  but it no longer checks if {{CallbackInfo.shouldHint}} which checks for 
> {{StorageProxy.shouldHint}} which ultimately checks if 
> {{{}hinted_handoff_enabled=true{}}}.
> This could cause some tests which expect hints to be disabled to fail 
> intermittently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18304) hinted_handoff_enabled=false is not honored

2023-03-09 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18304:
--
Reviewers: Aleksey Yeschenko, Stefan Miklosovic  (was: Stefan Miklosovic)

> hinted_handoff_enabled=false is not honored
> ---
>
> Key: CASSANDRA-18304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18304
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Normal
> Fix For: 4.1.x, 5.x
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> I've had some dtests with disabled hints failing.
> After investigation it seems that CASSANDRA-17164 moved hint submission on 
> timeout from 
> [RequestCallbacks.onExpired|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-b73c13ea8cae91a215495917fe5e90d55c9f4a283f9e053110992bc9a60004b8L176]
>  to 
> [AbstractWriteResponseHandler.onFailure|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-3b202de0d077638bede7bf4076a15eb4d483b717f955f11e743efb8d27c6eb1dR285],
>  but it no longer checks if {{CallbackInfo.shouldHint}} which checks for 
> {{StorageProxy.shouldHint}} which ultimately checks if 
> {{{}hinted_handoff_enabled=true{}}}.
> This could cause some tests which expect hints to be disabled to fail 
> intermittently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18304) hinted_handoff_enabled=false is not honored

2023-03-09 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17698376#comment-17698376
 ] 

Aleksey Yeschenko commented on CASSANDRA-18304:
---

So, {{WriteCallbackInfo}} code is all dead weight and should be removed. Pushed 
a commit that does it here: 
https://github.com/iamaleksey/cassandra/commits/18304-dead-code-removal

{{allowHints}} argument to some of the upstream methods needs to make its way 
to {{AbstractWriteResponseHandler}}, or, alternatively, we need to make sure 
that mutation supplier is always null when when {{!allowHints}} and never null 
when {{allowHints}}.

> hinted_handoff_enabled=false is not honored
> ---
>
> Key: CASSANDRA-18304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18304
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Normal
> Fix For: 4.1.x, 5.x
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> I've had some dtests with disabled hints failing.
> After investigation it seems that CASSANDRA-17164 moved hint submission on 
> timeout from 
> [RequestCallbacks.onExpired|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-b73c13ea8cae91a215495917fe5e90d55c9f4a283f9e053110992bc9a60004b8L176]
>  to 
> [AbstractWriteResponseHandler.onFailure|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-3b202de0d077638bede7bf4076a15eb4d483b717f955f11e743efb8d27c6eb1dR285],
>  but it no longer checks if {{CallbackInfo.shouldHint}} which checks for 
> {{StorageProxy.shouldHint}} which ultimately checks if 
> {{{}hinted_handoff_enabled=true{}}}.
> This could cause some tests which expect hints to be disabled to fail 
> intermittently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18304) hinted_handoff_enabled=false is not honored

2023-03-07 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17697497#comment-17697497
 ] 

Aleksey Yeschenko commented on CASSANDRA-18304:
---

Sure, let me see.

> hinted_handoff_enabled=false is not honored
> ---
>
> Key: CASSANDRA-18304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18304
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Hints
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Normal
> Fix For: 4.1.x, 5.x
>
>
> I've had some dtests with disabled hints failing.
> After investigation it seems that CASSANDRA-17164 moved hint submission on 
> timeout from 
> [RequestCallbacks.onExpired|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-b73c13ea8cae91a215495917fe5e90d55c9f4a283f9e053110992bc9a60004b8L176]
>  to 
> [AbstractWriteResponseHandler.onFailure|https://github.com/apache/cassandra/commit/d2923275e360a1ee9db498e748c269f701bb3a8b#diff-3b202de0d077638bede7bf4076a15eb4d483b717f955f11e743efb8d27c6eb1dR285],
>  but it no longer checks if {{CallbackInfo.shouldHint}} which checks for 
> {{StorageProxy.shouldHint}} which ultimately checks if 
> {{{}hinted_handoff_enabled=true{}}}.
> This could cause some tests which expect hints to be disabled to fail 
> intermittently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18134) Improve handling of min/max clustering in sstable

2023-02-17 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17690514#comment-17690514
 ] 

Aleksey Yeschenko commented on CASSANDRA-18134:
---

bq. Let me ask question as simple as possible: Can I merge it to trunk given CI 
is OK?

Go for it.

> Improve handling of min/max clustering in sstable
> -
>
> Key: CASSANDRA-18134
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18134
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/SSTable
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 5.x
>
>
> This patch improves the following things:
> # SSTable metadata will store a covered slice in addition min/max 
> clusterings. The difference is that for slices there is available the type of 
> a bound rather than just a clustering. In particular it will provide the 
> information whether the lower and upper bound of an sstable is opened or 
> closed. The legacy min/max clustering will be stored until a new major format 
> {{o}} to ensure backward compatibility
> # SSTable metadata will store a flag whether the SSTable contains any 
> partition level deletions or not
> # SSTable metadata will store the first and the last keys of the sstable. 
> This is mostly for consistency - key range is logically a part of stats 
> metadata. So far it is stored at the end of the index summary. After this 
> change, index summary will be no longer needed to read key range of an 
> sstable (although we will keep storing key range as before for compatibility 
> reasons)
> # The above two changes required to introduce a new minor format for SSTables 
> - {{nc}}
> # Single partition read command makes use of the above changes. In particular 
> an sstable can be skipped when it does not intersect with the column filter, 
> does not have partition level deletions and does not have statics; In case 
> there are partition level deletions, but the other conditions are satisfied, 
> only the partition header needs to be accessed (tests attached)
> # Skipping sstables assuming those three conditions are satisfied has been 
> implemented also for partition range queries (tests attached). Also added 
> minor separate statistics to record the number of accessed sstables in 
> partition reads because now not all of them need to be accessed. That 
> statistics is also needed in tests to confirm skipping.
> # Artificial lower bound marker is now an object on its own and is not 
> implemented as a special case of range tombstone bound. Instead it sorts 
> right before the lowest available bound in the data
> # Extended the lower bound optimization usage due the 1 and 2
> # Do not initialize iterator just to get a cached partition and associated 
> columns index. The purpose of using lower bound optimization was to avoid 
> opening an iterator of an sstable if possible.
> See also CASSANDRA-14861
> The changes in this patch include work of [~blambov], [~slebresne], 
> [~jakubzytka] and [~jlewandowski]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18134) Improve handling of min/max clustering in sstable

2023-02-17 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17690393#comment-17690393
 ] 

Aleksey Yeschenko commented on CASSANDRA-18134:
---

You can also defer committing -nc- support to 4.0.x until something else 
warrants an sstable version change on 4.0.x - if that ever happens.

> Improve handling of min/max clustering in sstable
> -
>
> Key: CASSANDRA-18134
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18134
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/SSTable
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 5.x
>
>
> This patch improves the following things:
> # SSTable metadata will store a covered slice in addition min/max 
> clusterings. The difference is that for slices there is available the type of 
> a bound rather than just a clustering. In particular it will provide the 
> information whether the lower and upper bound of an sstable is opened or 
> closed. The legacy min/max clustering will be stored until a new major format 
> {{o}} to ensure backward compatibility
> # SSTable metadata will store a flag whether the SSTable contains any 
> partition level deletions or not
> # SSTable metadata will store the first and the last keys of the sstable. 
> This is mostly for consistency - key range is logically a part of stats 
> metadata. So far it is stored at the end of the index summary. After this 
> change, index summary will be no longer needed to read key range of an 
> sstable (although we will keep storing key range as before for compatibility 
> reasons)
> # The above two changes required to introduce a new minor format for SSTables 
> - {{nc}}
> # Single partition read command makes use of the above changes. In particular 
> an sstable can be skipped when it does not intersect with the column filter, 
> does not have partition level deletions and does not have statics; In case 
> there are partition level deletions, but the other conditions are satisfied, 
> only the partition header needs to be accessed (tests attached)
> # Skipping sstables assuming those three conditions are satisfied has been 
> implemented also for partition range queries (tests attached). Also added 
> minor separate statistics to record the number of accessed sstables in 
> partition reads because now not all of them need to be accessed. That 
> statistics is also needed in tests to confirm skipping.
> # Artificial lower bound marker is now an object on its own and is not 
> implemented as a special case of range tombstone bound. Instead it sorts 
> right before the lowest available bound in the data
> # Extended the lower bound optimization usage due the 1 and 2
> # Do not initialize iterator just to get a cached partition and associated 
> columns index. The purpose of using lower bound optimization was to avoid 
> opening an iterator of an sstable if possible.
> See also CASSANDRA-14861
> The changes in this patch include work of [~blambov], [~slebresne], 
> [~jakubzytka] and [~jlewandowski]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18134) Improve handling of min/max clustering in sstable

2023-02-17 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17690387#comment-17690387
 ] 

Aleksey Yeschenko commented on CASSANDRA-18134:
---

You can push -nc- support to both 4.0.x and trunk. 

If the changes are perceived to be too risky for a 4.0.x release at this point, 
then the 4.0.x patch can be a minimal version of that for trunk: only writing 
the additional data but not using it for queries, or writing some sentinel 
values instead.

> Improve handling of min/max clustering in sstable
> -
>
> Key: CASSANDRA-18134
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18134
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/SSTable
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 5.x
>
>
> This patch improves the following things:
> # SSTable metadata will store a covered slice in addition min/max 
> clusterings. The difference is that for slices there is available the type of 
> a bound rather than just a clustering. In particular it will provide the 
> information whether the lower and upper bound of an sstable is opened or 
> closed. The legacy min/max clustering will be stored until a new major format 
> {{o}} to ensure backward compatibility
> # SSTable metadata will store a flag whether the SSTable contains any 
> partition level deletions or not
> # SSTable metadata will store the first and the last keys of the sstable. 
> This is mostly for consistency - key range is logically a part of stats 
> metadata. So far it is stored at the end of the index summary. After this 
> change, index summary will be no longer needed to read key range of an 
> sstable (although we will keep storing key range as before for compatibility 
> reasons)
> # The above two changes required to introduce a new minor format for SSTables 
> - {{nc}}
> # Single partition read command makes use of the above changes. In particular 
> an sstable can be skipped when it does not intersect with the column filter, 
> does not have partition level deletions and does not have statics; In case 
> there are partition level deletions, but the other conditions are satisfied, 
> only the partition header needs to be accessed (tests attached)
> # Skipping sstables assuming those three conditions are satisfied has been 
> implemented also for partition range queries (tests attached). Also added 
> minor separate statistics to record the number of accessed sstables in 
> partition reads because now not all of them need to be accessed. That 
> statistics is also needed in tests to confirm skipping.
> # Artificial lower bound marker is now an object on its own and is not 
> implemented as a special case of range tombstone bound. Instead it sorts 
> right before the lowest available bound in the data
> # Extended the lower bound optimization usage due the 1 and 2
> # Do not initialize iterator just to get a cached partition and associated 
> columns index. The purpose of using lower bound optimization was to avoid 
> opening an iterator of an sstable if possible.
> See also CASSANDRA-14861
> The changes in this patch include work of [~blambov], [~slebresne], 
> [~jakubzytka] and [~jlewandowski]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18134) Improve handling of min/max clustering in sstable

2023-02-17 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17690244#comment-17690244
 ] 

Aleksey Yeschenko commented on CASSANDRA-18134:
---

We do not and should not base the decision on whether to bump the major sstable 
version on what branch it's going into. That's why we have independent 
versioning schemes for some of the components in the first place - instead of 
using the singular C* version everywhere.

Regarding major, minor, and patch, this does not track our historic use of the 
language. Since we don't and never have followed semver here, we've only ever 
had two components to our versioning: first two numbers designated to the major 
(1.2 in 1.2.10, 2.0 in 2.0.3, 2.1 in 2.1.2, 3.11 in 3.11.9, etc) and one number 
designated to the minor, less often referred to as patch (10 in 1.2.10, 3 in 
2.0.3, 2 in 2.1.2, 9 in 3.11.9, etc).

And yes we also use the words release and mention pretty much interchangeably 
and that's okay.

> Improve handling of min/max clustering in sstable
> -
>
> Key: CASSANDRA-18134
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18134
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/SSTable
>Reporter: Jacek Lewandowski
>Assignee: Jacek Lewandowski
>Priority: Normal
> Fix For: 5.x
>
>
> This patch improves the following things:
> # SSTable metadata will store a covered slice in addition min/max 
> clusterings. The difference is that for slices there is available the type of 
> a bound rather than just a clustering. In particular it will provide the 
> information whether the lower and upper bound of an sstable is opened or 
> closed. The legacy min/max clustering will be stored until a new major format 
> {{o}} to ensure backward compatibility
> # SSTable metadata will store a flag whether the SSTable contains any 
> partition level deletions or not
> # SSTable metadata will store the first and the last keys of the sstable. 
> This is mostly for consistency - key range is logically a part of stats 
> metadata. So far it is stored at the end of the index summary. After this 
> change, index summary will be no longer needed to read key range of an 
> sstable (although we will keep storing key range as before for compatibility 
> reasons)
> # The above two changes required to introduce a new minor format for SSTables 
> - {{nc}}
> # Single partition read command makes use of the above changes. In particular 
> an sstable can be skipped when it does not intersect with the column filter, 
> does not have partition level deletions and does not have statics; In case 
> there are partition level deletions, but the other conditions are satisfied, 
> only the partition header needs to be accessed (tests attached)
> # Skipping sstables assuming those three conditions are satisfied has been 
> implemented also for partition range queries (tests attached). Also added 
> minor separate statistics to record the number of accessed sstables in 
> partition reads because now not all of them need to be accessed. That 
> statistics is also needed in tests to confirm skipping.
> # Artificial lower bound marker is now an object on its own and is not 
> implemented as a special case of range tombstone bound. Instead it sorts 
> right before the lowest available bound in the data
> # Extended the lower bound optimization usage due the 1 and 2
> # Do not initialize iterator just to get a cached partition and associated 
> columns index. The purpose of using lower bound optimization was to avoid 
> opening an iterator of an sstable if possible.
> See also CASSANDRA-14861
> The changes in this patch include work of [~blambov], [~slebresne], 
> [~jakubzytka] and [~jlewandowski]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18238) Implicitly enable ALLOW FILTERING on virtual tables

2023-02-06 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17684755#comment-17684755
 ] 

Aleksey Yeschenko commented on CASSANDRA-18238:
---

+1

> Implicitly enable ALLOW FILTERING on virtual tables
> ---
>
> Key: CASSANDRA-18238
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18238
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Feature/Virtual Tables
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Ticket to track work / discussion of this thread (1)
> (1) https://lists.apache.org/thread/104fld746d6qtggq5132n3hqtjqqpkjp



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18135) Accord: transition Node.Id from long to int

2023-02-06 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18135:
--
Resolution: Fixed
Status: Resolved  (was: Triage Needed)

> Accord: transition Node.Id from long to int
> ---
>
> Key: CASSANDRA-18135
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18135
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 4.2
>
>
> Trimmed down version of the patch, swapping long for int, but still keeping 
> Node.Id class. Delaying the rest (elimination of Node.Id as a class) until 
> immutability work lands, to ease rebase pain.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch cep-15-accord updated: Switch Node.Id from long to int

2023-02-06 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-15-accord by this push:
 new 7abbb337de Switch Node.Id from long to int
7abbb337de is described below

commit 7abbb337dea6de3c28dca55f081fd476b8b7ef7c
Author: Aleksey Yeschenko 
AuthorDate: Thu Feb 2 16:37:39 2023 +

Switch Node.Id from long to int

patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for
CASSANDRA-18135
---
 .build/include-accord.sh   |  2 +-
 .../cassandra/service/accord/AccordKeyspace.java   |  6 +++---
 .../cassandra/service/accord/EndpointMapping.java  | 24 --
 .../accord/serializers/TopologySerializers.java| 10 -
 .../cassandra/service/accord/AccordTestUtils.java  |  6 +++---
 .../service/accord/EndpointMappingTest.java|  2 +-
 .../serializers/TopologySerializersTest.java   |  2 +-
 7 files changed, 18 insertions(+), 34 deletions(-)

diff --git a/.build/include-accord.sh b/.build/include-accord.sh
index 5609ea0585..34ee959221 100755
--- a/.build/include-accord.sh
+++ b/.build/include-accord.sh
@@ -25,7 +25,7 @@ set -o nounset
 bin="$(cd "$(dirname "$0")" > /dev/null; pwd)"
 
 accord_repo='https://github.com/apache/cassandra-accord.git'
-accord_sha='0cc9e273b2eaa37d82a1ae1ac2681aec65aa0f6d'
+accord_sha='da77b744e4fdb5f39656e4269f4f1806e485c9c0'
 accord_src="$bin/cassandra-accord"
 
 _main() {
diff --git a/src/java/org/apache/cassandra/service/accord/AccordKeyspace.java 
b/src/java/org/apache/cassandra/service/accord/AccordKeyspace.java
index 9148bb4311..6cd1d6dddf 100644
--- a/src/java/org/apache/cassandra/service/accord/AccordKeyspace.java
+++ b/src/java/org/apache/cassandra/service/accord/AccordKeyspace.java
@@ -122,8 +122,8 @@ public class AccordKeyspace
 public static final String COMMANDS = "commands";
 public static final String COMMANDS_FOR_KEY = "commands_for_key";
 
-private static final String TIMESTAMP_TUPLE = "tuple";
-private static final TupleType TIMESTAMP_TYPE = new 
TupleType(Lists.newArrayList(LongType.instance, LongType.instance, 
LongType.instance));
+private static final String TIMESTAMP_TUPLE = "tuple";
+private static final TupleType TIMESTAMP_TYPE = new 
TupleType(Lists.newArrayList(LongType.instance, LongType.instance, 
Int32Type.instance));
 private static final String KEY_TUPLE = "tuple";
 
 private static final ClusteringIndexFilter FULL_PARTITION = new 
ClusteringIndexSliceFilter(Slices.ALL, false);
@@ -532,7 +532,7 @@ public class AccordKeyspace
 if (bytes == null || ByteBufferAccessor.instance.isEmpty(bytes))
 return null;
 ByteBuffer[] split = TIMESTAMP_TYPE.split(ByteBufferAccessor.instance, 
bytes);
-return factory.create(split[0].getLong(), split[1].getLong(), new 
Node.Id(split[2].getLong()));
+return factory.create(split[0].getLong(), split[1].getLong(), new 
Node.Id(split[2].getInt()));
 }
 
 private static  T 
deserializeTimestampOrNull(UntypedResultSet.Row row, String name, 
TimestampFactory factory)
diff --git a/src/java/org/apache/cassandra/service/accord/EndpointMapping.java 
b/src/java/org/apache/cassandra/service/accord/EndpointMapping.java
index 49717801a9..a863ca7410 100644
--- a/src/java/org/apache/cassandra/service/accord/EndpointMapping.java
+++ b/src/java/org/apache/cassandra/service/accord/EndpointMapping.java
@@ -25,6 +25,7 @@ import java.net.UnknownHostException;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableCollection;
 import com.google.common.collect.ImmutableMap;
+import com.google.common.primitives.Ints;
 
 import accord.local.Node;
 import org.apache.cassandra.locator.InetAddressAndPort;
@@ -36,33 +37,16 @@ public class EndpointMapping
 {
 Preconditions.checkArgument(endpoint.getAddress() instanceof 
Inet4Address);
 Inet4Address address = (Inet4Address) endpoint.getAddress();
-byte[] bytes = address.getAddress();
-long id = 0;
-for (int i=0; i<4; i++)
-id = (id * 1000) + Byte.toUnsignedLong(bytes[i]);
-id = (id * 10) + endpoint.getPort();
+int id = Ints.fromByteArray(address.getAddress());
 return new Node.Id(id);
 }
 
 static InetAddressAndPort idToEndpoint(Node.Id node)
 {
-long id = node.id;
-Preconditions.checkArgument(id >= 0);
-
-int port = (int) (id % 10);
-id = id / 10;
-byte[] bytes = new byte[4];
-for (int i=0; i<4; i++)
-{
-long octet = id % 1000;
-Preconditions.checkArgument(octet >= 0 && octet <= 255, "Malformed 
id");
-bytes[3-i] 

[cassandra-accord] branch trunk updated: Swap long for int inside Node.Id

2023-02-06 Thread aleksey
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


The following commit(s) were added to refs/heads/trunk by this push:
 new da77b74  Swap long for int inside Node.Id
da77b74 is described below

commit da77b744e4fdb5f39656e4269f4f1806e485c9c0
Author: Aleksey Yeschenko 
AuthorDate: Tue Jan 31 16:02:37 2023 +

Swap long for int inside Node.Id

patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for
CASSANDRA-18135
---
 accord-core/build.gradle  |  2 +-
 .../src/main/java/accord/local/CommandStores.java |  8 
 accord-core/src/main/java/accord/local/Node.java  | 14 ++
 accord-core/src/main/java/accord/local/Status.java|  3 ++-
 accord-core/src/main/java/accord/messages/Defer.java  |  4 ++--
 .../src/main/java/accord/utils/ArrayBuffers.java  |  2 +-
 .../verify/StrictSerializabilityVerifierTest.java | 19 +++
 .../src/main/java/accord/maelstrom/Json.java  |  4 ++--
 8 files changed, 21 insertions(+), 35 deletions(-)

diff --git a/accord-core/build.gradle b/accord-core/build.gradle
index 146f9fa..32e1164 100644
--- a/accord-core/build.gradle
+++ b/accord-core/build.gradle
@@ -36,7 +36,7 @@ dependencies {
 // Dependencies we depend on that are not part of our API.
 // These act as runtimeOnly dependencies to users
 implementation 'org.slf4j:slf4j-api:1.7.36'
-implementation 'com.carrotsearch:hppc:0.8.1'
+implementation 'org.agrona:agrona:1.17.1'
 }
 
 task burn(type: JavaExec) {
diff --git a/accord-core/src/main/java/accord/local/CommandStores.java 
b/accord-core/src/main/java/accord/local/CommandStores.java
index 09ad0fc..467e23e 100644
--- a/accord-core/src/main/java/accord/local/CommandStores.java
+++ b/accord-core/src/main/java/accord/local/CommandStores.java
@@ -26,9 +26,9 @@ import accord.utils.MapReduce;
 import accord.utils.MapReduceConsume;
 
 import accord.utils.ReducingFuture;
-import com.carrotsearch.hppc.IntObjectMap;
-import com.carrotsearch.hppc.IntObjectScatterMap;
 import com.google.common.annotations.VisibleForTesting;
+import org.agrona.collections.Hashing;
+import org.agrona.collections.Int2ObjectHashMap;
 import org.apache.cassandra.utils.concurrent.Future;
 
 import java.util.ArrayList;
@@ -200,14 +200,14 @@ public abstract class CommandStores
 static class Snapshot
 {
 final ShardHolder[] shards;
-final IntObjectMap byId;
+final Int2ObjectHashMap byId;
 final Topology local;
 final Topology global;
 
 Snapshot(ShardHolder[] shards, Topology local, Topology global)
 {
 this.shards = shards;
-this.byId = new IntObjectScatterMap<>(shards.length);
+this.byId = new Int2ObjectHashMap<>(shards.length, 
Hashing.DEFAULT_LOAD_FACTOR, true);
 for (ShardHolder shard : shards)
 byId.put(shard.store.id(), shard.store);
 this.local = local;
diff --git a/accord-core/src/main/java/accord/local/Node.java 
b/accord-core/src/main/java/accord/local/Node.java
index 4ccc05c..70be03a 100644
--- a/accord-core/src/main/java/accord/local/Node.java
+++ b/accord-core/src/main/java/accord/local/Node.java
@@ -57,18 +57,16 @@ import net.nicoulaj.compilecommand.annotations.Inline;
 import org.apache.cassandra.utils.concurrent.AsyncFuture;
 import org.apache.cassandra.utils.concurrent.Future;
 
-import static accord.primitives.Routable.Domain.Key;
-
 public class Node implements ConfigurationService.Listener, NodeTimeService
 {
 public static class Id implements Comparable
 {
 public static final Id NONE = new Id(0);
-public static final Id MAX = new Id(Long.MAX_VALUE);
+public static final Id MAX = new Id(Integer.MAX_VALUE);
 
-public final long id;
+public final int id;
 
-public Id(long id)
+public Id(int id)
 {
 this.id = id;
 }
@@ -76,7 +74,7 @@ public class Node implements ConfigurationService.Listener, 
NodeTimeService
 @Override
 public int hashCode()
 {
-return Long.hashCode(id);
+return Integer.hashCode(id);
 }
 
 @Override
@@ -93,12 +91,12 @@ public class Node implements ConfigurationService.Listener, 
NodeTimeService
 @Override
 public int compareTo(Id that)
 {
-return Long.compare(this.id, that.id);
+return Integer.compare(this.id, that.id);
 }
 
 public String toString()
 {
-return Long.toString(id);
+return Integer.toString(id);
 }
 }
 
diff --git a/accord-core/src/main/java/accord/local/Status.java 
b/accord-core/src/main/java/accord/local/Status.java
index 158bb89..98e9e23 100644
--- a/accord-core/src/main/java/accord/local

[jira] [Commented] (CASSANDRA-18238) Implicitly enable ALLOW FILTERING on virtual tables

2023-02-06 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17684655#comment-17684655
 ] 

Aleksey Yeschenko commented on CASSANDRA-18238:
---

It doesn't need to be a table param and doesn't need to be put in schema.

> Implicitly enable ALLOW FILTERING on virtual tables
> ---
>
> Key: CASSANDRA-18238
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18238
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Feature/Virtual Tables
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Ticket to track work / discussion of this thread (1)
> (1) https://lists.apache.org/thread/104fld746d6qtggq5132n3hqtjqqpkjp



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18238) Implicitly enable ALLOW FILTERING on virtual tables

2023-02-06 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17684631#comment-17684631
 ] 

Aleksey Yeschenko commented on CASSANDRA-18238:
---

Comment param is not there to encode arbitrary attributes, let's not hijack 
that field, please.

> Implicitly enable ALLOW FILTERING on virtual tables
> ---
>
> Key: CASSANDRA-18238
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18238
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Feature/Virtual Tables
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Ticket to track work / discussion of this thread (1)
> (1) https://lists.apache.org/thread/104fld746d6qtggq5132n3hqtjqqpkjp



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-18135) Accord: transition Node.Id from long to int

2023-02-03 Thread Aleksey Yeschenko (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-18135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17683940#comment-17683940
 ] 

Aleksey Yeschenko commented on CASSANDRA-18135:
---

https://github.com/apache/cassandra-accord/pull/34
https://github.com/apache/cassandra/pull/2134
https://app.circleci.com/pipelines/github/iamaleksey/cassandra?branch=18135

> Accord: transition Node.Id from long to int
> ---
>
> Key: CASSANDRA-18135
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18135
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 4.2
>
>
> Trimmed down version of the patch, swapping long for int, but still keeping 
> Node.Id class. Delaying the rest (elimination of Node.Id as a class) until 
> immutability work lands, to ease rebase pain.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18135) Accord: transition Node.Id from long to int

2023-02-03 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18135:
--
Fix Version/s: 4.2

> Accord: transition Node.Id from long to int
> ---
>
> Key: CASSANDRA-18135
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18135
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 4.2
>
>
> Trimmed down version of the patch, swapping long for int, but still keeping 
> Node.Id class. Delaying the rest (elimination of Node.Id as a class) until 
> immutability work lands, to ease rebase pain.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-18135) Accord: transition Node.Id from long to int

2023-02-03 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-18135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-18135:
--
Component/s: Accord

> Accord: transition Node.Id from long to int
> ---
>
> Key: CASSANDRA-18135
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18135
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Accord
>    Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
>
> Trimmed down version of the patch, swapping long for int, but still keeping 
> Node.Id class. Delaying the rest (elimination of Node.Id as a class) until 
> immutability work lands, to ease rebase pain.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



  1   2   3   4   5   6   7   8   9   10   >