CNDB-9821 Lock-free RequestSensors#syncAllSensors implementation
Addresses: https://github.com/riptano/cndb/issues/9821
This is another proposal (see https://github.com/datastax/cassandra/pull/1156) to implement a lock-free RequestSensors#syncAllSensors. The sensor changes are anti-pattern but maybe justified for optimization purposes. This patch alleviates the need of ReadWrite locks and the in memory sensors value snapshots.
The benchmark results are:
Benchmark Mode Cnt Score Error Units
RequestSensorsBench.syncAllSensors thrpt 5 48446.429 ± 7200.384 ops/s
vs.
Benchmark Mode Cnt Score Error Units
RequestSensorsBench.syncAllSensors thrpt 5 8978.558 ± 674.063 ops/s
without this patch. Note that the improvements from https://github.com/datastax/cassandra/pull/1156.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code
I am not sure we can trust this benchmark mainly because SensorRegistry is not incrementing (returning empty sensor) unless we populate keyspace and tableId in the setup
Closed in favor of https://github.com/datastax/cassandra/pull/1184