apple / apple/foundationdb

client_buggify can cause commit_unknown_result_fatal

Open
#10,312 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

`commit_unknown_result_fatal` should not be thrown by client buggify since retry loops aren't expected to handle it.

This can happen under the following conditions:
- The transaction has automatic idempotency enabled
- The transaction does not perform any reads
- `commit_unknown_result` is thrown from https://github.com/apple/foundationdb/blob/8878de8c8f06ab7557b5edf40ffe6ae50a35ac19/fdbclient/NativeAPI.actor.cpp#L6603
- ~~No idempotency ids have ever been expired due to their age~~ (not necessary)

Proposal:
1. Move the client buggify error codes associated with the grv proxy into `getReadVersion`, where they probably belong anyway.
2. Move the client buggify error codes associated with the commit proxy to directly before the commit rpc is made. Keep the potential buggify of `commit_unknown_result` for handling a successful commit.

This should make it safe to assume that the read version is set before `determineCommitStatus` (correcting the underlying problem)

Contributor guide

Open the contributing guide

Research direction

Start in fdbclient/NativeAPI.actor.cpp around the cited commit_unknown_result path, then trace getReadVersion and determineCommitStatus. Check where client buggify error codes are injected for the GRV and commit proxies, and verify that the read version is set before determineCommitStatus while commit_unknown_result remains available for successful commits.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.