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

map/set/zset/list data_cf distributed compaction #15

Open
rockeet opened this issue Sep 12, 2023 · 0 comments
Open

map/set/zset/list data_cf distributed compaction #15

rockeet opened this issue Sep 12, 2023 · 0 comments

Comments

@rockeet
Copy link
Collaborator

rockeet commented Sep 12, 2023

data_cf distributed compaction needs DB::Get from default cf in CompactionFilter, we bulk load all hash keys from default cf and save to shared filesystem for reading in dcompact workers.

When compaction input of dafa_cf is small but hash keys in default cf is large, this is a very big waste, --- when compact upper levels of data_cf, this may be likely happens.

So we should check data size in default cf before starting remote compaction, if it reaches a threshold of a percent of compaction input of dafa_cf, it should fallback to local compact.

  1. Use Compaction::column_family_data() to get default cf handle and DB ptr, this needs a global std::map
  2. Use DB::GetApproximateSizes() to get size in default cf.

Thus a customized CompactionExecutorFactory should be defined -- it should references DcompactEtcd factory and forward methods, the key point is to override ShouldRunLocal(compaction).

rockeet added a commit to rockeet/blackwidow that referenced this issue Sep 12, 2023
rockeet added a commit that referenced this issue Sep 12, 2023
rockeet added a commit to rockeet/blackwidow that referenced this issue Sep 12, 2023
rockeet added a commit that referenced this issue Sep 13, 2023
rockeet added a commit to rockeet/blackwidow that referenced this issue Sep 13, 2023
rockeet added a commit to rockeet/blackwidow that referenced this issue Sep 13, 2023
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

No branches or pull requests

1 participant