Skip to content
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

Merged
merged 6 commits into from
Aug 7, 2024
Merged

Conversation

ZexiLiu
Copy link
Contributor

@ZexiLiu ZexiLiu commented Aug 6, 2024

This PR is based on the assumption that the async flusher queue is only used for log store.

@@ -16,6 +16,7 @@ limitations under the License.

#pragma once

#include "internal_helper.h"
Copy link
Contributor Author

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.

* normal data store are used. Only effective when
* `numFlusherThreads` >= 2.
*/
bool dedicatedSyncOnlyFlusher;
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, handleAsyncReqsOnly.

Copy link
Contributor Author

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"
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@greensky00 greensky00 merged commit fb7904f into eBay:master Aug 7, 2024
1 check passed
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