This is an automated email from the ASF dual-hosted git repository.
gianm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new f0ea14b2f39 perf: Hoist config check in acquireSegment. (#19503)
f0ea14b2f39 is described below
commit f0ea14b2f39370c1b97405babe52f3fb36a3120f
Author: Gian Merlino <[email protected]>
AuthorDate: Thu May 21 23:56:51 2026 -0700
perf: Hoist config check in acquireSegment. (#19503)
When virtual storage is not enabled, it is not possible for a segment
to be acquired unless it is already-existing.
---
.../apache/druid/segment/loading/SegmentLocalCacheManager.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java
b/server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java
index 62e955227c5..8514c4e92a8 100644
---
a/server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java
+++
b/server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java
@@ -473,6 +473,10 @@ public class SegmentLocalCacheManager implements
SegmentCacheManager
return acquireExisting;
}
+ if (!config.isVirtualStorage()) {
+ return AcquireSegmentAction.missingSegment();
+ }
+
final ReferenceCountingLock lock = lock(dataSegment);
synchronized (lock) {
try {
@@ -481,10 +485,6 @@ public class SegmentLocalCacheManager implements
SegmentCacheManager
return retryAcquireExisting;
}
- if (!config.isVirtualStorage()) {
- return AcquireSegmentAction.missingSegment();
- }
-
final Iterator<StorageLocation> iterator = strategy.getLocations();
while (iterator.hasNext()) {
final StorageLocation location = iterator.next();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]