Skip to content

Commit

Permalink
typo: fix typo in db/write_thread's state (#8423)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #8423

Reviewed By: mrambacher

Differential Revision: D29232587

Pulled By: jay-zhuang

fbshipit-source-id: 04d4937cf0605cbf341a920d1305369a7b8f0574
  • Loading branch information
mapleFU authored and facebook-github-bot committed Jun 19, 2021
1 parent 82a70e1 commit 19a8926
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions db/write_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class WriteThread {
// non-parallel informs a follower that its writes have been committed
// (-> STATE_COMPLETED), or when a leader that has chosen to perform
// updates in parallel and needs this Writer to apply its batch (->
// STATE_PARALLEL_FOLLOWER).
// STATE_PARALLEL_MEMTABLE_WRITER).
STATE_INIT = 1,

// The state used to inform a waiting Writer that it has become the
Expand Down Expand Up @@ -129,7 +129,7 @@ class WriteThread {
WriteGroup* write_group;
SequenceNumber sequence; // the sequence number to use for the first key
Status status;
Status callback_status; // status returned by callback->Callback()
Status callback_status; // status returned by callback->Callback()

std::aligned_storage<sizeof(std::mutex)>::type state_mutex_bytes;
std::aligned_storage<sizeof(std::condition_variable)>::type state_cv_bytes;
Expand Down Expand Up @@ -246,7 +246,7 @@ class WriteThread {
std::condition_variable& StateCV() {
assert(made_waitable);
return *static_cast<std::condition_variable*>(
static_cast<void*>(&state_cv_bytes));
static_cast<void*>(&state_cv_bytes));
}
};

Expand All @@ -273,7 +273,7 @@ class WriteThread {
// STATE_GROUP_LEADER. If w has been made part of a sequential batch
// group and the leader has performed the write, returns STATE_DONE.
// If w has been made part of a parallel batch group and is responsible
// for updating the memtable, returns STATE_PARALLEL_FOLLOWER.
// for updating the memtable, returns STATE_PARALLEL_MEMTABLE_WRITER.
//
// The db mutex SHOULD NOT be held when calling this function, because
// it will block.
Expand Down Expand Up @@ -310,8 +310,8 @@ class WriteThread {
// the next leader if needed.
void ExitAsMemTableWriter(Writer* self, WriteGroup& write_group);

// Causes JoinBatchGroup to return STATE_PARALLEL_FOLLOWER for all of the
// non-leader members of this write batch group. Sets Writer::sequence
// Causes JoinBatchGroup to return STATE_PARALLEL_MEMTABLE_WRITER for all of
// the non-leader members of this write batch group. Sets Writer::sequence
// before waking them up.
//
// WriteGroup* write_group: Extra state used to coordinate the parallel add
Expand Down

0 comments on commit 19a8926

Please sign in to comment.