VGalaxies commented on code in PR #13250:
URL: https://github.com/apache/iotdb/pull/13250#discussion_r1734438007
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/event/EnrichedEvent.java:
##########
@@ -108,27 +108,32 @@ protected EnrichedEvent(
*/
public boolean increaseReferenceCount(final String holderMessage) {
boolean isSuccessful = true;
+
synchronized (this) {
if (isReleased.get()) {
LOGGER.warn(
"re-increase reference count to event that has already been
released: {}, stack trace: {}",
coreReportMessage(),
Thread.currentThread().getStackTrace());
isSuccessful = false;
- // Here we still increase the reference count, to remain consistent
with the behavior after
- // internal increase failure.
- referenceCount.incrementAndGet();
Review Comment:
don't forget to modify the corresponding javadoc...
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]