Skip to content

Conversation

@galibey
Copy link
Contributor

@galibey galibey commented Apr 28, 2022

The produce handler uses the acks field from ProduceRequest to determine which isolation will be taken.
In case of ReadCommitted isolation, it waits until the replica's hw includes records from the requests before returning the response. Awaiting is limited by the timeout_ms field of the request. For now, the timeout is not shared between partitions, it is counted separately for each partition.

For ReadUncommitted there is no waiting.

Related #2302

@galibey galibey requested review from morenol and sehz April 28, 2022 12:49
Copy link

@sehz sehz left a comment

Choose a reason for hiding this comment

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

The first pass looks good.

Meantime, can you add integration tests similar to fetch tests?

@galibey galibey requested a review from sehz April 29, 2022 14:12
Copy link

@sehz sehz left a comment

Choose a reason for hiding this comment

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

Looks very good. Couple of minor comments

NotLeaderForPartition,
#[fluvio(tag = 7)]
#[error("the request timed out.")]
RequestTimedOut,
Copy link

Choose a reason for hiding this comment

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

Can we add timeout period and what kind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@galibey galibey requested a review from sehz May 2, 2022 08:36
Copy link

@sehz sehz left a comment

Choose a reason for hiding this comment

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

LGTM. Nice Job

@sehz
Copy link

sehz commented May 2, 2022

bors r+

bors bot pushed a commit that referenced this pull request May 2, 2022
The produce handler uses the `acks` field from `ProduceRequest` to determine which isolation will be taken. 
In case of `ReadCommitted` isolation, it waits until the replica's `hw` includes records from the requests before returning the response. Awaiting is limited by the `timeout_ms` field of the request. For now, the timeout is not shared between partitions, it is counted separately for each partition. 

For `ReadUncommitted` there is no waiting.

Related #2302
@bors
Copy link

bors bot commented May 2, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title Support ReadCommitted isolation in SPU for Produce requests [Merged by Bors] - Support ReadCommitted isolation in SPU for Produce requests May 2, 2022
@bors bors bot closed this May 2, 2022
@galibey galibey deleted the feature/2302-producer-read-comitted-isolation branch May 4, 2022 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants