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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AbstractReadOnlyController.java:
##########
@@ -61,8 +64,13 @@ public static void manageActiveClusterIdFile(boolean 
readOnlyEnabled, MasterFile
           activeClusterFile);
         try {
           if (fs.exists(activeClusterFile)) {
-            fs.delete(activeClusterFile, false);
-            LOG.info("Successfully deleted active cluster file: {}", 
activeClusterFile);
+            FSDataInputStream in = fs.open(activeClusterFile);
+            byte[] actualClusterFileData = IOUtils.toByteArray(in);
+            byte[] expectedClusterFileData = mfs.getSuffixFileDataToWrite();

Review Comment:
   Thanks @Kota-SH , I will be using the same method to not update the 
activeClusterSuffix variable unintentionally.
   
   Also note that instead of get I am changing the name to 
computeAndSetSuffixFileDataToWrite() instead of getSuffixFileDataToWrite()



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