-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add dedicated flusher for syncOnly #170
Conversation
@@ -16,6 +16,7 @@ limitations under the License. | |||
|
|||
#pragma once | |||
|
|||
#include "internal_helper.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for NOT_INITIALIZED
.
include/libjungle/db_config.h
Outdated
* normal data store are used. Only effective when | ||
* `numFlusherThreads` >= 2. | ||
*/ | ||
bool dedicatedSyncOnlyFlusher; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change the config name, given that the flusher with this will handle the requests by flushLogsAsync
, no matter what the request is (sync, flush, purge, ...).
I think dedicatedFlusherForAsyncReqs
will be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
src/flusher.h
Outdated
@@ -82,6 +83,7 @@ class Flusher : public WorkerBase { | |||
|
|||
GlobalConfig gConfig; | |||
size_t lastCheckedFileIndex; | |||
bool handleSyncOnly; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, handleAsyncReqsOnly
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
src/db_mgr.cc
Outdated
@@ -21,6 +21,7 @@ limitations under the License. | |||
#include "db_internal.h" | |||
#include "flusher.h" | |||
#include "internal_helper.h" | |||
#include "libjungle/db_config.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this after log_reclaimer.h
and before <set>
? Should be treated as 3rd party header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
This PR is based on the assumption that the async flusher queue is only used for log store.