Performance 12498089633: Make more index key reading async#3237
Performance 12498089633: Make more index key reading async#3237alexowens90 wants to merge 1 commit into
Conversation
ArcticDB Code Review SummaryReviewed the async refactor of No blocking issues found in the async refactor. (See previous notes on §10 async/deadlock, executor choice, and lifetimes — all still hold.) Update — new commits (delta reviewed against
|
| auto column_stats = std::nullopt; | ||
| return IndexInformation{std::move(key_seg_pair_try.value()), column_stats}; | ||
| } else { | ||
| throw storage::NoDataFoundException(fmt::format( |
There was a problem hiding this comment.
I know this was the case before, but it seems odd to reraise everything as a NoDataFoundException.
I.e. surely we don't want to mask a network error as NoDataFound.
I'd be in favor of reraising the key_seg_pair_try.exception() type.
There are probably other places we do this so this should probably be a separate PR.
There was a problem hiding this comment.
Agreed. Raising consistent exception types in general across all code paths for versions not existing/keys not existing would be a nice thing to do next time we're doing a major version bump for something more important. I found this crap as part of my refactor (which is the same for update), which is correctly a NoSuchVersionException for the batch methods.
4dea3d1 to
ddb63d9
Compare
Reference Issues/PRs
12498089633
What does this implement or fix?
read_index_key_without_column_statscalledread_syncto get the index key in many async contexts that effectively added a blocking IO to what were meant to be completely asynchronous functions.This makes
read_index_key_without_column_statsasync, and chains futures from it where necessary (synchronous callers just call.get()immediately. The sync versionread_index_key_without_column_stats_synchas been added for use inmerge_update_implto avoid rebase nightmares with ongoing work, @vasil-pashov will switch it to using the async version and remove the sync version as part of one of his PRs in this area.