client-java icon indicating copy to clipboard operation
client-java copied to clipboard

Transaction support TwoPhaseCommiter

Open gmatej opened this issue 3 years ago • 5 comments

Is the transaction support in Java Client useful?

We are testing compared to go and it's very slow. It takes 8s for go to persist 1M keys. And probably 1minute or more to do the same in java.

Is there a special tactic that should be written in primary key. Why is GO so much faster?

gmatej avatar Jul 05 '22 10:07 gmatej

There are still more Java devs than Go devs. A working java client would be very useful for the community I would say.

gmatej avatar Jul 05 '22 10:07 gmatej

In client-go, many optimisations are applied to txnkv since TiDB uses it. client-go will batch the writes and has a write buffer for transactions, client-java just has the primitive operation for 2PC. Client java will focus on rawkv for now, but we might refactor the transaction function in the future once the https://github.com/tikv/rfcs/pull/69 is fully implemented.

iosmanthus avatar Jul 05 '22 10:07 iosmanthus

Thanks. For the info. Maybe it would be better to make a JNI wrapper. As it seems all client development is in GO. And the client is not really lightweight.

gmatej avatar Jul 05 '22 13:07 gmatej

@gmatej Hi gays! Do you know how to use KvClient scan,this method scan(ByteString startKey, long version, int limit)

T-TRz879 avatar Jul 06 '22 06:07 T-TRz879

This issue is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Aug 06 '22 00:08 github-actions[bot]