client-rust
client-rust copied to clipboard
Support KeySpace
KeySpace is fundamental for transaction safety and multi-tenant features for TiKV. This is the tracking issue for the feature in client-rust. For tracking issues of other components, check:
- TiKV: https://github.com/tikv/tikv/issues/12999
- PD: https://github.com/tikv/pd/issues/5293
- client-go: https://github.com/tikv/client-go/issues/545
Currently, https://github.com/tikv/client-rust/pull/353 has introduced a new type parameter for both the transaction and the raw client to support an extensible request codec. We have two implementations for now: plain API V1 and API V2 with the keyspace feature. However, we only support constructing a new API V2 instance by ApiV2::default(). More new functions should be provided to enable users to create keyspaces by keyspace_name or keyspace_id. This requires:
- [ ] implement acquiring keyspace info from PD. @iosmanthus
- [ ] introduces a keyspace cache for each instance of the client. @iosmanthus
- [ ] unit/integration tests for API v2 @iosmanthus