Skip to content

Should Partition Handles be kept around? #142

Closed Answered by marvin-j97
fkrause98 asked this question in Q&A
Discussion options

You must be logged in to vote

All open partitions are stored in the keyspace behind a RwLock. If the partition(s) you are using are fixed at runtime, holding onto the handle skips going through that lock each time, also it avoids the construction cost of an Options struct, which should be cheap, but is non-zero.

You can also keep them (or possibly a subset) in your own RwLock (do not use a Mutex), if you have a dynamic (sub)set of partitions during runtime.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by marvin-j97
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants