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 metadata url to RocksDB #30

Merged
merged 6 commits into from
Jan 3, 2024
Merged

Add metadata url to RocksDB #30

merged 6 commits into from
Jan 3, 2024

Conversation

n00m4d
Copy link
Contributor

@n00m4d n00m4d commented Dec 28, 2023

What

This PR fixes insert metadata url to Postgre


let number_of_tasks = tasks_buffer.len();

if number_of_tasks > MAX_BUFFERED_TASKS_TO_TAKE {
Copy link
Contributor

@RequescoS RequescoS Jan 3, 2024

Choose a reason for hiding this comment

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

Dont we need to check
if number_of_tasks + metadata_info.len() > MAX_BUFFERED_TASKS_TO_TAKE
here?

Copy link
Collaborator

@StanChe StanChe Jan 3, 2024

Choose a reason for hiding this comment

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

Did you mean tasks_to_insert?

if number_of_tasks + tasks_to_insert.len() > MAX_BUFFERED_TASKS_TO_TAKE {
tasks_to_insert.extend(
tasks_buffer
.drain(0..MAX_BUFFERED_TASKS_TO_TAKE - tasks_to_insert.len())
Copy link
Collaborator

Choose a reason for hiding this comment

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

What if the tasks_to_insert already holds more than max_buffered_tasks_to_take?

@StanChe StanChe merged commit c23208b into main Jan 3, 2024
1 check failed
@RequescoS RequescoS deleted the feat/metadata-url branch January 3, 2024 12:03
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.

3 participants