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 TableEvictType & TableReader::ForceEvict #175

Open
wants to merge 13 commits into
base: dev.1.4
Choose a base branch
from

Conversation

mm304321141
Copy link
Collaborator

No description provided.

@yapple
Copy link
Collaborator

yapple commented Dec 10, 2021

  1. we should design some UT to confirm each enum of evicting option is work
  2. use db_stats to statistic the evict count

@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch 6 times, most recently from 9104e02 to 3ddc482 Compare December 15, 2021 09:19
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch 2 times, most recently from 8f154e5 to 4bddc46 Compare January 20, 2022 08:17
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch 3 times, most recently from dd272aa to d8fe7a5 Compare February 10, 2022 08:17
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch 8 times, most recently from 73e1134 to 599010d Compare February 23, 2022 11:39
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch from 599010d to 6ed45ab Compare February 23, 2022 12:25
iiter.reset();

// IndexBlock
do_evict(rep_->dummy_index_reader_offset);
Copy link
Collaborator

Choose a reason for hiding this comment

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

对于partitioned index,如果其CacheDependencies了,好像这些Dependencies没处理?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

是的,DataBlock 是大头,先清理了,这部分还要再看看怎么搞

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@@ -99,6 +99,8 @@ class TableReader {
bool (*callback_func)(void* arg, const Slice& key,
LazyBuffer&& value));

virtual Status ForceEvict() { return Status::NotSupported(); }
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we should comment on all virtual functions like others in this file? So we could understand what is the purposes of this ForceEvict() without reading through the callstack.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@@ -528,6 +524,8 @@ DEFINE_bool(new_table_reader_for_compaction_inputs, true,

DEFINE_int32(compaction_readahead_size, 0, "Compaction readahead size");

DEFINE_int32(table_evict_type, 0, "Table evict type");
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should provide a description of the potential options here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

table/block_based_table_reader.cc Outdated Show resolved Hide resolved
db/version_set.cc Outdated Show resolved Hide resolved
db/table_cache.cc Show resolved Hide resolved
db/table_cache.cc Show resolved Hide resolved
db/column_family.cc Show resolved Hide resolved
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch 2 times, most recently from ee337bb to b382632 Compare February 25, 2022 09:06
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch from b382632 to 7035f41 Compare February 25, 2022 09:08
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch 2 times, most recently from 248ba01 to 363f0e5 Compare June 14, 2022 21:13
Fix close db slowly when force evict disabled
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch 5 times, most recently from b8f14cd to 3e98c11 Compare June 15, 2022 04:15
@mm304321141 mm304321141 force-pushed the feature-block-cache-evict branch from 3e98c11 to ae369bf Compare June 15, 2022 04:19
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.

5 participants