Has the coprocessor functionality of TiKV RawKV been implemented?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tikv RawKV 的 coprocessor 功能是否已经实现?

| username: TiDBer_rODzqedf

RFC: Coprocessor Plugin by andylokandy · Pull Request #63 · tikv/rfcs · GitHub Regarding whether this RFC has been implemented,

I found someone saying that the coprocessor plugin solution has not been implemented

But it looks like the related PRs have all been merged (LFX: Coprocessor Plugin · Issue #9747 · tikv/tikv · GitHub), so I’m a bit confused. Is there any documentation for using/developing coprocessor v2?

| username: Billmay表妹 | Original post link

TiKV’s Coprocessor V2 is an upgraded and improved version of the Coprocessor. Here are the main differences between Coprocessor V2 and Coprocessor:

  1. Functionality and Performance: Coprocessor V2 has been optimized and improved in terms of functionality and performance. It introduces a new execution engine that provides higher execution efficiency and lower latency. Coprocessor V2 also supports more operations, such as index scanning and aggregation, better meeting the needs of complex queries.
  2. Interface and Programming Model: Coprocessor V2 introduces new interfaces and programming models, making it easier for developers to write and manage Coprocessors. It offers more flexible interfaces, supporting custom computation logic and data processing workflows.
  3. Compatibility: Coprocessor V2 is an upgrade to the Coprocessor, so in terms of compatibility, Coprocessor V2 is not compatible with the Coprocessor. If your application uses the Coprocessor, you will need to make corresponding modifications and migrations to use Coprocessor V2.

In summary, Coprocessor V2 is an improved and upgraded version of the Coprocessor, offering better functionality and performance. If you are currently using the Coprocessor, you might consider migrating to Coprocessor V2 to gain better performance and richer features.

| username: 有猫万事足 | Original post link

The only possible implementation is probably the raw_storage_impl.rs in the same folder.
How to compile it into a binary file and place it in a certain directory, and there’s no introduction to hot loading. You can only see the related configuration items:

If you want to customize TiKV operators through the coprocessor plugin, it’s quite difficult.

If you accept reading and then computing, I think you can try relying on Tispark to achieve similar functionality.

| username: oceanzhang | Original post link

2 is an upgraded version of 1.