jihoonson commented on a change in pull request #8114: Fix race between
canHandle() and addSegment() in StorageLocation
URL: https://github.com/apache/incubator-druid/pull/8114#discussion_r307845160
##########
File path:
server/src/main/java/org/apache/druid/segment/loading/StorageLocation.java
##########
@@ -44,19 +45,25 @@
private static final Logger log = new Logger(StorageLocation.class);
private final File path;
- private final long maxSize; // in bytes
+ private final long maxSizeBytes;
private final long freeSpaceToKeep;
- // Set of files stored under the given path. All accesses must be
synchronized with currSize.
+ /**
+ * Set of files stored under the given path. All accesses must be
synchronized with currSizeBytes.
+ */
+ @GuardedBy("this")
private final Set<File> files = new HashSet<>();
- // Current total size of files in bytes. All accesses must be synchronized
with files.
- private long currSize = 0;
+ /**
+ * Current total size of files in bytes. All accesses must be synchronized
with files.
Review comment:
Removed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]