STAR-844 Read/Write hooks#250
Conversation
5745947 to
8b46c7b
Compare
8b46c7b to
46e5216
Compare
Other API parts were removed and will be added in the subsequent commits. Only the "write" API is present for now, it's implementation is added in the next commit.
46e5216 to
bb77585
Compare
bb77585 to
90f34ef
Compare
There was a problem hiding this comment.
Just curious, how can this happen? I expected the lwtTacker to be the noop version at the very least?
There was a problem hiding this comment.
good catch, it a leftover from a previous implementation. Fixed.
The ClientState conveys information about the client. It will be passed to trackers in subsequent commits. Tracker implementations are free to interpret client's information supplied to StorageProxy. For the most cases the ClientState instance comes directly from QueryState but in case of Tracing on replicas this approach in impossible. Tracing on replicas reconstructs TracingState from Message.Header. ClientState is mocked there from ClientState.forInternalCalls with traced keyspace. The keyspace has been added to the Message.Header for this purpose only.
Writes and batch writes are the simplest case for tracking. The trackers watch onf for write start and end (success or failure).
So far we do not count transferred rows/partitions only number of [range] reads.
So far we do not count transferred rows/partitions only number of read/writes.
Row and Partition tracking is achieved by `ReadTrackingTransformation` applied to unfiltered row iterators. We apply the transformation early to prepare for possible tracker extension with tombstone accounting (that is present in the original QIT).
Don't track the first phase of RFP to avoid extra calls to ReadTracker callback methods. Only the "final" unfiltered rows are tracked.
This substitutes `queried` callback method from the original QIT. OSS C* uses ReplicaPlans instead of plain endpoint lists.
this caused confusion when QIT test was executed with other tests.
90f34ef to
8bce859
Compare
In the original patch traced keyspace comes from TracingClientState, not from ClientState. This commit fixes this mistake. Additionally add graceful handling nulls for traced keyspace as adding null values to trace headers results in NPE.
946645d to
dd8a51c
Compare
| * <p>For writes, the {@link #onWrite} method is only called for the "user write", but if that write trigger either | ||
| * secondary index or materialized views updates, those additional update do not trigger additional calls. | ||
| * | ||
| * <p>The methods of this tracker are called on hot path, so none of them should be blocking, and they should be as |
There was a problem hiding this comment.
The "blocking" part is a TPC artifact, there's no need for implementations to be non-blocking here.
| */ | ||
| interface ReadTracker extends Tracker | ||
| { | ||
| ReadTracker NOOP = new ReadTracker() |
There was a problem hiding this comment.
Nit: although these are constants, I find things much easier to read if they are placed after the type is actually defined i.e. at the end rather than at the beginning of the interface/class.
| metrics.casWriteMetrics.timeouts.mark(); | ||
| metrics.writeMetricsMap.get(consistencyForPaxos).timeouts.mark(); | ||
| lwtTracker.onError(wte); | ||
| throw new CasWriteTimeoutException(wte.writeType, wte.consistency, wte.received, wte.blockFor, wte.contentions); |
There was a problem hiding this comment.
Curious why new exception with the same data rather than just throw wte? This is obfuscating the stack trace of the actual failure.
There was a problem hiding this comment.
true, I don't know why tho.
| consistencyLevel, | ||
| queryState, | ||
| queryStartNanoTime, | ||
| readTracker), command); |
|
|
||
| return StorageProxy.read(Group.one(this), consistency, queryState, queryStartNanoTime); | ||
| Group group = Group.one(this); | ||
| QueryInfoTracker.ReadTracker readTracker = StorageProxy.queryTracker().onRead(queryState.getClientState(), |
There was a problem hiding this comment.
It looks like this is not the right place for the onRead, onDone pair. Tracking is said to be StorageProxy-level, and this will catch more calls than the ones going through that. It is also inconsistent with the range query path.
There was a problem hiding this comment.
I moved it down to StorageProxy. This doesn't change the logic, though.
| */ | ||
|
|
||
| UnfilteredPartitionIterator merged = UnfilteredPartitionIterators.merge(results, mergeListener); | ||
| UnfilteredPartitionIterator trackedPartitionIterator = Transformation.apply(merged, new ReadTrackingTransformation(resolveReadTracker)); |
There was a problem hiding this comment.
This has some cost to performance; can we make transformation conditional on there being a tracker or alternatively verify that the cost is negligible?
There was a problem hiding this comment.
changed for DataResolver and DigestResolver
|
Kudos, SonarCloud Quality Gate passed! |
This is a port of - https://github.com/riptano/bdp/commit/b6f0a18cb832c62f05cdcbd9cdcc2923f2fa727f - https://github.com/riptano/bdp/pull/19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63)
This is a port of - https://github.com/riptano/bdp/commit/b6f0a18cb832c62f05cdcbd9cdcc2923f2fa727f - https://github.com/riptano/bdp/pull/19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63)
This is a port of - https://github.com/riptano/bdp/commit/b6f0a18cb832c62f05cdcbd9cdcc2923f2fa727f - https://github.com/riptano/bdp/pull/19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f)
This is a port of - https://github.com/riptano/bdp/commit/b6f0a18cb832c62f05cdcbd9cdcc2923f2fa727f - https://github.com/riptano/bdp/pull/19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f)
This is a port of - https://github.com/riptano/bdp/commit/b6f0a18cb832c62f05cdcbd9cdcc2923f2fa727f - https://github.com/riptano/bdp/pull/19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994)
This is a port of - https://github.com/riptano/bdp/commit/b6f0a18cb832c62f05cdcbd9cdcc2923f2fa727f - https://github.com/riptano/bdp/pull/19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf) (Rebase of commit 99dbcaa)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf) (Rebase of commit 99dbcaa)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf) (Rebase of commit 99dbcaa)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf) (Rebase of commit 99dbcaa)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf) (Rebase of commit 99dbcaa)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf) (Rebase of commit 99dbcaa)
This is a port of - riptano/bdp@b6f0a18 - riptano/bdp#19468 The first change set introduces QueryInfoTracker (QIT) interface and hooks it to StorageProxy. The second adds ClientState to the interface. The original QIT utilizes ReadReconciliationObserver in the ReadTracker paths. Only onRow, onPartition and queried callbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho: - The callback methods are added directly to ReadTracker as CC doesn't have ReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to the ReadTracker makes the interface cleaner and easier to understand. - CC operates on ReplicaPlans instead of plain host lists, that is why queried was changed to onReplicaPlan. (cherry picked from commit c32e91f) (cherry picked from commit 093bc63) (cherry picked from commit efdfa1f) (cherry picked from commit 2ab888d) (cherry picked from commit 546bc4a) STAR-844 Fix rebase conflict in ParamType with CASSANDRA-17981 (cherry picked from commit 12cd994) (cherry picked from commit 5ce23cf) (Rebase of commit 99dbcaa)









This is a port of
The first change set introduces
QueryInfoTracker(QIT) interface and hooks it toStorageProxy. The second addsClientStateto the interface.The original QIT utilizes
ReadReconciliationObserverin theReadTrackerpaths. OnlyonRow,onPartitionandqueriedcallbacks are utilized by CNDB and thus only these methods are ported to Converged Cassandra (CC). The callbacks are a bit different tho:ReadTrackeras CC doesn't haveReadReconciliationObserver. The class was added as a part of NodeSync effort and it is rather superfluous. Porting the whole class would add unnecessary complexity. Adding the required methods directly to theReadTrackermakes the interface cleaner and easier to understand.ReplicaPlansinstead of plain host lists, that is whyqueriedwas changed toonReplicaPlan.The PR adds empty QIT (with write callback only) +
ClientStateand then step by step extends it with more callback methods. It is advisable to review commit by commit although some of the code parts were slightly refactored along the way.