simbadzina commented on code in PR #5860:
URL: https://github.com/apache/hadoop/pull/5860#discussion_r1269919579
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -1928,9 +1929,17 @@ public BatchedEntries<OpenFileEntry> listOpenFiles(long
prevId,
@Override
public void msync() throws IOException {
rpcServer.checkOperation(NameNode.OperationCategory.READ, true);
- Set<FederationNamespaceInfo> nss = namenodeResolver.getNamespaces();
+ Set<FederationNamespaceInfo> allNamespaces =
namenodeResolver.getNamespaces();
RemoteMethod method = new RemoteMethod("msync");
- rpcClient.invokeConcurrent(nss, method);
+ Set<FederationNamespaceInfo> namespacesEligibleForObserverReads = new
HashSet<>();
Review Comment:
allNamespace does not change often. Only when an entire nameservice becomes
inactive. The set of nonEligibleNamenodes is only refreshed on startup. A cache
may help. Wondering whether checking the cache is just as expensive as doing
the calculation each time. A set equality check vs. filtering the set each time.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]