Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Dec 27, 2023
1 parent bd8e4ad commit 836e4aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/raw/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ impl<PdC: PdClient> Client<PdC> {
/// # });
pub async fn get_key_ttl_secs(&self, key: impl Into<Key>) -> Result<Option<u64>> {
debug!("invoking raw get_key_ttl_secs request");
let key = key.into().encode_version(self.api_version, KeyMode::Raw);
let key = key.into().encode_keyspace(self.keyspace, KeyMode::Raw);
let request = new_raw_get_key_ttl_request(key, self.cf.clone());
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), self.api_version, request)
let plan = crate::request::PlanBuilder::new(self.rpc.clone(), self.keyspace, request)
.retry_multi_region(self.backoff.clone())
.merge(CollectSingle)
.post_process_default()
Expand Down
4 changes: 2 additions & 2 deletions src/transaction/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ impl Client {
let pd = Arc::new(PdRpcClient::connect(&pd_endpoints, config.clone(), true).await?);
let keyspace = match config.keyspace {
Some(keyspace) => {
let keyspace_id = pd.get_keyspace_id(&keyspace).await?;
Keyspace::Enable { keyspace_id }
let keyspace = pd.load_keyspace(&keyspace).await?;
Keyspace::Enable { keyspace_id: keyspace.id }
}
None => Keyspace::Disable,
};
Expand Down

0 comments on commit 836e4aa

Please sign in to comment.