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

task_map: added task map scaling #10044

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

leonardo-albertovich
Copy link
Collaborator

This PR modifies the task_map member of the global context structure (struct flb_config) to make its size dynamic, adds a new field named task_map_size to track its size and ancillary functions flb_config_task_map_resize and flb_config_task_map_grow to manage its size.

With these changes we overcome the 2048 concurrent task limit previously imposed by the static array size.

Copy link
Member

@edsiper edsiper left a comment

Choose a reason for hiding this comment

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

Minor change request:

  • add missing flb_errno();
  • add a simple internal unit test to test it behavior.

}

if (new_task_map == NULL) {
return -1;
Copy link
Member

Choose a reason for hiding this comment

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

missing flb_errno();

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in commit 0c3b656

Additionally the destructor now works with partially initialized
instances

Signed-off-by: Leonardo Alminana <[email protected]>
Signed-off-by: Leonardo Alminana <[email protected]>
Signed-off-by: Leonardo Alminana <[email protected]>
@duj4
Copy link

duj4 commented Mar 11, 2025

Could you please have a check on this PR? @edsiper @patrick-stephens

@patrick-stephens patrick-stephens added ok-package-test Run PR packaging tests and removed docs-required labels Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-package-test Run PR packaging tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log lost when task_id is occupied
4 participants