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

bucket notification - introduce batch param #8685

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

alphaprinz
Copy link
Contributor

Explain the changes

  1. Processing a large enough number of pending notifications results in timeouts.
    This fix sends notifications in batches to avoid too many inflight requests.

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  1. Create a lot of pending notifications (I got timeouts with about 300).
  2. Processing the notifications shouldn't result in timeout (assuming target server has reasonable response time).
  • Doc added/updated
  • Tests added

config.js Outdated Show resolved Hide resolved
this.name = name;
this.connect_str_to_connection = new Map();
this.notif_to_connect = new Map();
this.fs_context = fs_context ?? get_process_fs_context();
this.connect_files_dir = connect_files_dir ?? DEFAULT_CONNECT_FILES_DIR;
this.nc_config_fs = nc_config_fs;
this.batch_size = batch_size || config.NOTIFICATION_BATCH || 10;
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought you will obviously remove it so I did not give comment on this.
Here now you can remove 10. right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might be over-protective in practice.
In theory someone might nullify config.NOTIFICATION_BATCH.

@alphaprinz alphaprinz requested a review from aspandey January 15, 2025 17:57
@alphaprinz alphaprinz merged commit 460592e into noobaa:master Jan 15, 2025
11 checks passed
alphaprinz added a commit to alphaprinz/noobaa-core that referenced this pull request Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants