-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
map: fix TestMapBatch failing with ENOSPC for hash maps
The batch lookup API for hash maps returns ENOSPC when a bucket doesn't fit into the provided batch. This is unfortunate since user space has no way to figure out what the largest bucket size is. This makes the API very awkward to use. It also seems that hash tables don't deal well with sequential keys, hashing them into the same bucket with fairly high probability. Fix the flaky test by always making the batch size equal to the map size, which means we can never trigger ENOSPC. Also make the error message more descriptive. Fixes: #1390 Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
- Loading branch information
Showing
2 changed files
with
87 additions
and
85 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