Revert "HBASE-24211: Create table is slow in large cluster when AccessController is enabled. (#1546)"
This breaks TestAccessController.testAccessControllerUserPermsRegexHandling This reverts commit 1d1f481e720339cc9c7a633483dbbf53f0e76528.
This commit is contained in:
parent
9c09ae5fa1
commit
a0f3e23c78
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper
@ -185,28 +185,25 @@ public class ZKPermissionWatcher extends ZKListener implements Closeable {
|
|||||||
public void nodeChildrenChanged(final String path) {
|
public void nodeChildrenChanged(final String path) {
|
||||||
waitUntilStarted();
|
waitUntilStarted();
|
||||||
if (path.equals(aclZNode)) {
|
if (path.equals(aclZNode)) {
|
||||||
// preempt any existing nodeChildrenChanged event processing
|
try {
|
||||||
if (childrenChangedFuture != null && !childrenChangedFuture.isDone()) {
|
final List<ZKUtil.NodeAndData> nodeList =
|
||||||
boolean cancelled = childrenChangedFuture.cancel(true);
|
ZKUtil.getChildDataAndWatchForNewChildren(watcher, aclZNode);
|
||||||
if (!cancelled) {
|
// preempt any existing nodeChildrenChanged event processing
|
||||||
// task may have finished between our check and attempted cancel, this is fine.
|
if (childrenChangedFuture != null && !childrenChangedFuture.isDone()) {
|
||||||
if (!childrenChangedFuture.isDone()) {
|
boolean cancelled = childrenChangedFuture.cancel(true);
|
||||||
LOG.warn("Could not cancel processing node children changed event, "
|
if (!cancelled) {
|
||||||
+ "please file a JIRA and attach logs if possible.");
|
// task may have finished between our check and attempted cancel, this is fine.
|
||||||
|
if (! childrenChangedFuture.isDone()) {
|
||||||
|
LOG.warn("Could not cancel processing node children changed event, " +
|
||||||
|
"please file a JIRA and attach logs if possible.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
childrenChangedFuture = asyncProcessNodeUpdate(() -> refreshNodes(nodeList));
|
||||||
|
} catch (KeeperException ke) {
|
||||||
|
LOG.error("Error reading data from zookeeper for path "+path, ke);
|
||||||
|
watcher.abort("ZooKeeper error get node children for path "+path, ke);
|
||||||
}
|
}
|
||||||
childrenChangedFuture = asyncProcessNodeUpdate(() -> {
|
|
||||||
try {
|
|
||||||
final List<ZKUtil.NodeAndData> nodeList =
|
|
||||||
ZKUtil.getChildDataAndWatchForNewChildren(watcher, aclZNode);
|
|
||||||
refreshNodes(nodeList);
|
|
||||||
} catch (KeeperException ke) {
|
|
||||||
String msg = "ZooKeeper error while reading node children data for path " + path;
|
|
||||||
LOG.error(msg, ke);
|
|
||||||
watcher.abort(msg, ke);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -742,10 +742,6 @@ public final class ZKUtil {
|
|||||||
if (nodes != null) {
|
if (nodes != null) {
|
||||||
List<NodeAndData> newNodes = new ArrayList<>();
|
List<NodeAndData> newNodes = new ArrayList<>();
|
||||||
for (String node : nodes) {
|
for (String node : nodes) {
|
||||||
if (Thread.interrupted()) {
|
|
||||||
// Partial data should not be processed. Cancel processing by sending empty list.
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
String nodePath = ZNodePaths.joinZNode(baseNode, node);
|
String nodePath = ZNodePaths.joinZNode(baseNode, node);
|
||||||
byte[] data = ZKUtil.getDataAndWatch(zkw, nodePath);
|
byte[] data = ZKUtil.getDataAndWatch(zkw, nodePath);
|
||||||
newNodes.add(new NodeAndData(nodePath, data));
|
newNodes.add(new NodeAndData(nodePath, data));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user