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

Remove entry cache #77

Merged
merged 4 commits into from
Jul 21, 2021
Merged

Remove entry cache #77

merged 4 commits into from
Jul 21, 2021

Conversation

tabokie
Copy link
Member

@tabokie tabokie commented Jul 16, 2021

Signed-off-by: tabokie xy.tao@outlook.com

The existing entry cache implementation is overly complex (in order to maintain global FIFO eviction upon independent region caches), and is duplicated with caching at TiKV layer.

Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie tabokie requested a review from hicqu July 19, 2021 04:08
Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie tabokie changed the title Remove entry cache Remove entry cache and fix write ordering Jul 20, 2021
Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie tabokie changed the title Remove entry cache and fix write ordering Remove entry cache Jul 20, 2021
let (file_id, offset, fd) = queue.on_append(content.len(), sync)?;
pwrite_exact(fd.0, offset, content)?;
(file_id, offset, fd)
};
for listener in &self.listeners {
listener.on_append_log_file(queue, file_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

on_append_log_file must be called during the append queue is locked.

} else {
self.append_bytes(queue, &content, &mut sync)?
};
#[allow(clippy::branches_sharing_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

It can be removed.

@hicqu
Copy link
Contributor

hicqu commented Jul 20, 2021

rest LGTM!

Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie tabokie merged commit 9670199 into tikv:master Jul 21, 2021
@tabokie tabokie deleted the remove-entry-cache branch July 21, 2021 04:42
tabokie added a commit that referenced this pull request Jul 21, 2021
Signed-off-by: tabokie <xy.tao@outlook.com>
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.

None yet

2 participants