Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#362: Cache index table metadata in tserver when updating an index
Summary: Cache index table metadata in tserver when updating an index for performance. The cache is invalidated when the indexed table is altered. Test Plan: ``` java -jar ~/code/yugabyte/java/yb-loadtester/target/yb-sample-apps.jar -workload CassandraSecondaryIndex -num_threads_read 0 -num_threads_write 4 -nodes 127.0.0.1:9042 ``` Without cache: ``` 2018-07-05 17:07:41,973 [INFO|com.yugabyte.sample.common.metrics.MetricsTracker|MetricsTracker] Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 215.81 ops/sec (18.53 ms/op), 3517 total ops | Uptime: 25015 ms | maxWrittenKey: 3514 | maxGeneratedKey: 3520 | 2018-07-05 17:07:46,976 [INFO|com.yugabyte.sample.common.metrics.MetricsTracker|MetricsTracker] Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 217.65 ops/sec (18.37 ms/op), 4606 total ops | Uptime: 30018 ms | maxWrittenKey: 4605 | maxGeneratedKey: 4609 | 2018-07-05 17:07:51,979 [INFO|com.yugabyte.sample.common.metrics.MetricsTracker|MetricsTracker] Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 212.29 ops/sec (18.82 ms/op), 5668 total ops | Uptime: 35021 ms | maxWrittenKey: 5665 | maxGeneratedKey: 5671 | ``` With cache: ``` 2018-07-05 17:12:24,773 [INFO|com.yugabyte.sample.common.metrics.MetricsTracker|MetricsTracker] Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 229.69 ops/sec (17.42 ms/op), 2892 total ops | Uptime: 20015 ms | maxWrittenKey: 2891 | maxGeneratedKey: 2895 | 2018-07-05 17:12:29,776 [INFO|com.yugabyte.sample.common.metrics.MetricsTracker|MetricsTracker] Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 231.24 ops/sec (17.31 ms/op), 4049 total ops | Uptime: 25018 ms | maxWrittenKey: 4048 | maxGeneratedKey: 4052 | 2018-07-05 17:12:34,781 [INFO|com.yugabyte.sample.common.metrics.MetricsTracker|MetricsTracker] Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 235.37 ops/sec (16.97 ms/op), 5227 total ops | Uptime: 30023 ms | maxWrittenKey: 5225 | maxGeneratedKey: 5230 | ``` Also verify that no further RPC is executed at the master leader when the workload is run. Reviewers: pritam.damania, amitanand, mihnea Reviewed By: mihnea Subscribers: ybase, yql Differential Revision: https://phabricator.dev.yugabyte.com/D5112
- Loading branch information