sharmaar12 commented on code in PR #7361:
URL: https://github.com/apache/hbase/pull/7361#discussion_r2450620724


##########
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:
   @wchevreuil We haven't added any prevention mechanism which will avoid calls 
to `add` and `set` function in read-only mode, so are you suggesting to add it 
to these methods?
   
   Without these unit tests will always fails, as here I am deliberately 
calling them in test function.



-- 
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]

Reply via email to