github-actions[bot] commented on code in PR #61202:
URL: https://github.com/apache/doris/pull/61202#discussion_r2929346452
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/JdbcExternalCatalog.java:
##########
@@ -134,7 +134,7 @@ public void setDefaultPropsIfMissing(boolean isReplay) {
}
@Override
- public synchronized void resetToUninitialized(boolean invalidCache) {
+ public void resetToUninitialized(boolean invalidCache) {
super.resetToUninitialized(invalidCache);
Review Comment:
Observation (non-blocking): With `synchronized` removed from this override,
the `this.identifierMapping` assignment on the next line now runs outside any
synchronization. Previously, the method-level `synchronized` ensured that the
entire `super.resetToUninitialized() + identifierMapping` sequence was atomic
with respect to the catalog monitor.
In practice this is harmless because:
1. `identifierMapping` readers (`fromRemoteDatabaseName`, etc.) were already
unsynchronized, so there was never a proper happens-before guarantee anyway.
2. `identifierMapping` is a plain reference write (atomic in Java).
3. `resetToUninitialized` callers are infrequent admin operations unlikely
to race with each other.
If you want to be more rigorous, you could wrap the `identifierMapping`
assignment inside `synchronized(this)` too. But given the pre-existing lack of
synchronization on the read side, this isn't a regression.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]