Conversation
adamant-pwn
approved these changes
Feb 24, 2026
Contributor
adamant-pwn
left a comment
There was a problem hiding this comment.
Looks good overall. Some minor comments.
| WITH_MMAP = set_bit; | ||
| } | ||
|
|
||
| bool with_mmap(bool set_bit) { |
Contributor
There was a problem hiding this comment.
Let's only use set_mmap for setting it then? Otherwise it's counter-intuitive that set_bit = true enables it, but set_bit = false doesn't disable it.
| // fprintf(stderr, "\t --cache-size [INT] \tnumber of uncompressed rows to store in the cache [0]\n"); | ||
| fprintf(stderr, "\n\t --num-top-labels [INT] \tmaximum number of top labels per query by default [10'000]\n"); | ||
| fprintf(stderr, "\t --no-coord-mapping \t\tquery without mapping coords to sequence headers even if the .seq index exists [off]\n"); | ||
| fprintf(stderr, "\t --mem-cap-gb [FLOAT] \tmemory in GB available for the server to load graphs for queries into RAM [1]\n"); |
Contributor
There was a problem hiding this comment.
Should it be higher, like 4+ GB, given typical index sizes?
| exit(1); | ||
| } | ||
| logger->info("[Server] All graphs were loaded (with mmap). Ready to serve queries."); | ||
| utils::set_mmap(false); |
Contributor
There was a problem hiding this comment.
I'm a bit confused on what it tries to do, right after saying "all graphs loaded with mmap".
| " Make sure they're on a fast disk."); | ||
| utils::with_mmap(true); | ||
| } | ||
| loaded_with_mmap = true; |
Contributor
There was a problem hiding this comment.
Let's put it inside the if above.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support requests with flag
"in_ram": true, which means the graph would be fully loaded to RAM before querying.