Question about Version::GetOverlappingInputs
- Dominant language
- C++
- Stars
- 39.4k
- Forks
- 8.2k
- PR merge metrics
- No merged PRs in 30d
Description
When GetOverlappingInputs and in level 0, and when check if the newly added file has expanded the range, Why the start and end are not test independently like below? Then we can expand the range as soon as possible.
```diff
diff --git a/db/version_set.cc b/db/version_set.cc
index a459587..26ce691 100644
--- a/db/version_set.cc
+++ b/db/version_set.cc
@@ -526,8 +526,9 @@ void Version::GetOverlappingInputs(int level, const InternalKey* begin,
user_begin = file_start;
inputs->clear();
i = 0;
- } else if (end != nullptr &&
- user_cmp->Compare(file_limit, user_end) > 0) {
+ }
+
+ if (end != nullptr && user_cmp->Compare(file_limit, user_end) > 0) {
user_end = file_limit;
inputs->clear();
i = 0;
```
Contributor guide
Assessment
This issue has not been assessed yet.