The GitHub Actions job "CI" on kvrocks.git has succeeded.
Run started by GitHub user git-hulk (triggered by git-hulk).

Head commit for run:
7bffe39bace9dd22c5b9fdd9f5a8bc255a1de850 / git-hulk <hulk.webs...@gmail.com>
Implement the new command POLLUPDATES for polling updates by sequence

As proposed in issue #2469, we would like to add a new command for
polling updates from Kvrocks. The main purpose is to allow implement
feature like CDC(Change Stream Capture) without running an agent
alongside with Kvrocks instances to make it easier to operate.

The following is the command format:

```shell
POLLUPDATES <Sequence Number> [MAX <N>] [STRICT] [FORMAT <RAW>]
```

- `Sequence Number` represents the start sequence of the polling operation and 
it’s a required argument.
- `MAX` represents the maximum number of items that can be retrieved, it’s an 
optional argument and uses `16` as the default value if it’s missing
- `STRICT` is set means the update’s sequence MUST be exactly equal to the 
sequence number, it’s an optional argument. `GetUpdatesSince` will return the 
first available sequence if the sequence number is non-existent, so we allow 
users to specify if required to match the input sequence number.

And the output contains the following sections:

- last_sequence
- updates
- format
- next_sequence

For example, we assume the DB's latest sequence is 100 and we send the
command: `POLLUPDATES 90 MAX 3 FORMAT RAW`, it will return the following
response:

- "latest_sequence"
- 100
- "format"
- RAW
- "updates"
  - batch-0
  - batch-1
  - batch-2
- "next_sequence"
- 93

Report URL: https://github.com/apache/kvrocks/actions/runs/10283101761

With regards,
GitHub Actions via GitBox

Reply via email to