Issues with localreader/snapshot/coprocessor

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

Original topic: localreader/snapshot/coprocessor问题

| username: h5n1

In the performance process reading 读性能慢-TiKV Server 读流程详解 - #3,来自 北京大爷 - TiDB 的问答社区, the following content is mentioned:

  1. What kind of structure is a snapshot, and what does it contain? Is the current snapshot still constructed by calling the readpool thread?

  2. What is the relationship between snapshot, coprocessor, and raftstore threads?

  3. According to the changelog, the localreader thread was added and then removed in version 3.x, but in the current version (6.1.1), the tikv detail still shows localreader monitoring. What is the current role of localreader, and what is its relationship with snapshot and coprocessor?

  4. What aspect of processing size does the parameter raftstore.local-read-batch-size refer to?

| username: yilong | Original post link

  1. For snapshots, refer to Snapshot · facebook/rocksdb Wiki · GitHub. It should be the storage read pool.
  2. (1) After TiKV receives a coprocessor request, it first parses the request and then places it into the corresponding Coprocessor thread pool based on priority.
    (2) Once the request is scheduled by the Coprocessor thread pool, the first step is to obtain a Snapshot.
    (3) Then, a Handler is constructed based on the Snapshot to handle the request.
    (4) The request is processed using the Handler constructed in step 3.
    Others, please feel free to add more details.
| username: h5n1 | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.