-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix negative table size calculation when socket tracer disabled via s…
…tirling flag (#1894) Summary: When some or all of the tables `http_events, stirling_error, probe_status, proc_exit_events` are disabled via stirling flags (`PL_STIRLING_SOURCES=...`) the `other_table_size` calculation returns a negative output if `num_tables < 4`. It also attempts division by zero when `num_tables = 4` ```cpp int64_t other_table_size = (memory_limit - http_table_size - stirling_error_table_size - probe_status_table_size - proc_exit_events_table_size) / (num_tables - 4); ``` This PR streamlines the table size calculation and fixes the edge condition. Type of change: /kind bug Test Plan: deployed to node and manually checked calculated table sizes. --------- Signed-off-by: Benjamin Kilimnik <[email protected]>
- Loading branch information
1 parent
3078d85
commit d8aab71
Showing
2 changed files
with
92 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters