-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create repl req details for all IO types. (#336)
Following significant changes are made in this commit * Till now repl req is not created for header_only (inline) request, which results in different handling of request nullptr everywhere resulted in some crash. Made this uniform behavior on every types. * At present, we use replica set is_leader() to make decision on some commit, append entry code path. This could be potentially dangerous as at some inopprtunite time, if leader is switched and somehow the request survived, we might run into corruption cases. With this change, there is no special handling of leader. Only 2 roles, proposer and applier. In most use cases proposer is leader and applier is the follower, but that requirement is removed. * Because of the above assumption, there was a bug where in leader non-app entries (conf entries) are not guaranteed to be flushed, before calling commit. Fixed that behavior as well. * The HomeLogStore has an limitation (exposed when the above issue is fixed), whereby in proposer when the data write is completed and then propose to raft happens. RAFT calls end_of_append_batch in the same thread which does flush_sync. However, the data_write completion happens in IO thread and thus there is a potential for deadlock (since flush_sync takes giant lock). We can overcome this problem with fiber, but instead of forcing worker thread to have fiber, we isolate all logstore flush to be in separate flush thread always.
- Loading branch information
Showing
11 changed files
with
276 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.