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

feat(cubestore): Correct orphaned detection + optimizations #6051

Merged
merged 2 commits into from
Jan 25, 2023

Conversation

ovr
Copy link
Member

@ovr ovr commented Jan 24, 2023

Hello!

refs #5042

Thanks

@ovr ovr requested a review from a team as a code owner January 24, 2023 18:35
.into_iter()
.filter(|item| item.get_row().status == status_filter)
.collect()
let index_key = QueueItemIndexKey::ByPrefixAndStatus(prefix, status_filter);
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to improve Performance: Usage of index

|item| {
let mut new = item.clone();
new.status = QueueItemStatus::Active;
let mut new = id_row.get_row().clone();
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to improve Performance: update_with_fn do an additional lookup.

let mut new = id_row.get_row().clone();
new.update_heartbeat();

queue_schema.update(id_row.id, new, id_row.get_row(), batch_pipe)?;
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to improve Performance: update_with_fn do an additional lookup.

@ovr ovr merged commit 70e68ae into master Jan 25, 2023
@ovr ovr deleted the cubestore-heartbeat-fix branch January 25, 2023 15:40
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