wchevreuil commented on code in PR #7361:
URL: https://github.com/apache/hbase/pull/7361#discussion_r2448678460
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileTrackerBase.java:
##########
@@ -98,7 +101,10 @@ public final void add(Collection<StoreFileInfo> newFiles)
throws IOException {
@Override
public final void replace(Collection<StoreFileInfo> compactedFiles,
Collection<StoreFileInfo> newFiles) throws IOException {
- if (isPrimaryReplica) {
+ if (
+ isPrimaryReplica &&
!conf.getBoolean(HConstants.HBASE_GLOBAL_READONLY_ENABLED_KEY,
+ HConstants.HBASE_GLOBAL_READONLY_ENABLED_DEFAULT)
+ ) {
Review Comment:
Can we add same check to the `add` and `set` method? It would give an extra
safeguard just in case these methods are inadvertently called on read-replica.
--
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]