Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] Cdc log visible only when the data already flush to rocksDb from preWriteBuffer #179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swuferhong
Copy link
Collaborator

Purpose

This pr is aims to fix the visibility of the CDC log, it should only become visible after the KV data has been flushed to RocksDb.

Linked issue: #134

Tests

API and Format

Documentation

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add a test to reproduce the problem. Maybe add a test in ReplicaManagerTest to verify the high-watermark of the given record is must advanced if the given record can be read in kv.

* The base test class for client to server request and response. The server include
* CoordinatorServer and TabletServer.
*/
public class ClientToServerITCaseUtils {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be used.

"AckedLogEndOffset update from {} to {}.", messageOffset, newAckedLogEndOffset);

// when ackedLogEndOffset advanced, we may need to flush kv if it's kv replica
mayFlushKv(newAckedLogEndOffset.getMessageOffset());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can simplify flush kv first, and then update high-watermark? Our purpose is just make KV ready before log is available. This can avoid introducing additional variable ackedLogEndOffsetMetadata (it is quite complex if we need to handle the restore of the new variable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants