Questions tagged [tikv]

TiKV is a distributed Key-Value database which is based on the design of Google Spanner and HBase. It is the storage engine of TiDB.

TiKV features geo-replication, horizontal scalability, consistent distributed transactions, Coprocessor support and working with TiDB.

26 questions
4
votes
1 answer

How can I delete the data in TiKV directly?

I used tikvTxn to write the key-value data into TiKV directly and skip the TiDB. db, err := driver.Open("tikv://127.0.0.1:2379?disableGC=true") txn, _:= db.Begin() txn.set(key, value) txn.commit(context.Background()) ... I can't clean the data in…
Lyn
  • 51
  • 5
3
votes
1 answer

specifying the TiKV cluster endpoint as the backing data store error

1.start tikv commang: # tiup playground --tag surrealdb --mode tikv-slim --pd 1 --kv 1 tiup is checking updates for component playground ... Starting component `playground`: /root/.tiup/components/playground/v1.11.0/tiup-playground --tag surrealdb…
Tiansi Liu
  • 41
  • 2
2
votes
1 answer

Key Value Database Modeling for searchability

Let's say I am building a marketplace like eBay (or something) for example, With a data that looks like this (pseudo-code): public class Item { Double price; String geoHash; Long startAvailabilty; // timestamp Long endAvailabilty; //…
quarks
  • 33,478
  • 73
  • 290
  • 513
2
votes
1 answer

Java-grpc and tikv-java: NoSuchFieldError: CONTEXT_SPAN_KEY

I am using java-grpc together with tikv-java (separately they work OK). But together I am struggling with the following error: Exception in thread "main" java.lang.NoSuchFieldError: CONTEXT_SPAN_KEY at…
techkuz
  • 3,608
  • 5
  • 34
  • 62
2
votes
1 answer

Why the TiDB performance drop for 10 times when the updated field value is random?

I set up the TiDB, TiKV and PD cluster in order to benchmark them with YCSB tool, connected by the MySQL driver. The cluster consists of 5 instances for each of TiDB, TiKV and PD. Each node run a single TiDB, TiKV and PD instance. However, when I…
user1584887
  • 277
  • 1
  • 11
2
votes
1 answer

How do I connect existing TiKV nodes to a new cluster of PDs in TiDB?

I had a working TiDB instance running in gcloud, deployed using the tidb-ansible scripts. I wanted to replace the PD nodes with new ones, so I destroyed and replaced those. The PD cluster comes up ok now, but when I try to start the TiKV nodes, I…
dleng
  • 71
  • 9
1
vote
1 answer

How can I set memory capacity of each TIKV?

How can I set the capacity of a TIKV instance? Lets say I have 2 TIKV instances and I want them to consume 200GB of storage (each 100GB).
Elnur
  • 119
  • 1
  • 5
1
vote
2 answers

How is data replicated among 2 different TiKv clusters?

Suppose I have one TiKV cluster deployed in city A and another TiKV cluster deployed in city B. And I want to write data in cluster A and read it in cluster B. I know that inside cluster A, the data security is enforced by multi-group raft. But how…
Aaron
  • 461
  • 6
  • 17
1
vote
1 answer

how to optimize count(*)queries on tidb

I have a table with about 3000000 rows described as below. Field |Type |Null|Key|Default|Extra | ------------------|------------|----|---|-------|--------------| id |bigint(20) |NO |PRI| …
rshetye
  • 667
  • 1
  • 8
  • 21
0
votes
1 answer

Increased replication in TiKV cluster, but storage use did not increase after applying

I am running a TiKV v7.2.0 cluster, which was deployed with tiup with server_configs.pd.replication.max-replicas: 1 configured in topology. After storing about 8TB of data in the cluster, I edited the config to increase max-replicas to 2 with tiup…
Mike B
  • 1
0
votes
1 answer

TiDB executing full table scan

I am using TiDB version 6.5.1, I wanted to know the behavior of TiKV, let's say I have a table t which contains composite index example (a,b), when I am trying to execute following cases, 1.select sum(c) from t where a=123 and b='simple' group by…
Ajay
  • 47
  • 4
0
votes
1 answer

TiKV is sufficient for both OLTP and OLAP workloads?

I have an requirement to maintain big data sets in a single database and it should support both OLTP & OLAP workloads, I saw TiDB it will support HTAP workloads but we need to maintain data in TiKV & TiFlash to achieve full HTAP solution, since two…
Ajay
  • 47
  • 4
0
votes
1 answer

What different betweent optimistic and pessimistic in tikv?

When I use tikv api, and I found it has an option in TxnKV client, then I test it, but I can not find what the difference between optimistic and pessimistic is in tikv? The test code is this: func begin() kv.Transaction{ transaction, err :=…
0
votes
1 answer

Range query using TiKV database

How do you do range query with TiKV and java-client? Suppose I have this model: public class Hub implements Serializable { private String name; private List schedules; } and import java.time.LocalTime; public class Schedule…
Fireburn
  • 981
  • 6
  • 20
0
votes
1 answer

TIKV java client on MacOS: Failed to init client for PD cluster

I want to access TIKV using its java client on MacOS. I have a hello-world app: package com.pv.app; import org.tikv.common.TiConfiguration; import org.tikv.common.TiSession; import org.tikv.raw.RawKVClient; import…
techkuz
  • 3,608
  • 5
  • 34
  • 62
1
2