sunhelly commented on a change in pull request #715: HBASE-22940 Fix snapshot NoNode error URL: https://github.com/apache/hbase/pull/715#discussion_r334311545
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/EnabledTableSnapshotHandler.java ########## @@ -70,18 +68,10 @@ public EnabledTableSnapshotHandler prepare() throws Exception { */ @Override protected void snapshotRegions(List<Pair<RegionInfo, ServerName>> regions) throws IOException { - Set<String> regionServers = new HashSet<>(regions.size()); - for (Pair<RegionInfo, ServerName> region : regions) { - if (region != null && region.getFirst() != null && region.getSecond() != null) { - RegionInfo hri = region.getFirst(); - if (hri.isOffline() && (hri.isSplit() || hri.isSplitParent())) continue; - regionServers.add(region.getSecond().toString()); - } - } - // start the snapshot on the RS Procedure proc = coordinator.startProcedure(this.monitor, this.snapshot.getName(), - this.snapshot.toByteArray(), Lists.newArrayList(regionServers)); + this.snapshot.toByteArray(), master.getServerManager().getOnlineServersList() + .stream().map(ServerName::toString).collect(Collectors.toList())); Review comment: The problem is that all the RSes will add themselves to zk as acquired/reached, but Procedure only set those where the table regions on as barriers. So if all barriers reached, snapshot root node will be deleted, but the none barrier RSes may write on it and throw exception. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services