virajjasani opened a new pull request, #5482:
URL: https://github.com/apache/hadoop/pull/5482
RBF Mount table state store APIs addMountTableEntry, updateMountTableEntry
and removeMountTableEntry performs cache refresh for all routers regardless of
the actual record update result. If the record fails to get updated on
zookeeper/file based store impl, reloading the cache for all routers would be
unnecessary.
For instance, simultaneously adding new mount point could lead to failure
for the second call if first call has not added new entry by the time second
call retrieves mount table entry from getMountTableEntries before attempting to
call addMountTableEntry.
```
DEBUG [{cluster}/{ip}:8111] ipc.Client - IPC Client (1826699684) connection
to nn-0-{ns}.{cluster}/{ip}:8111 from {user}IPC Client (1826699684) connection
to nn-0-{ns}.{cluster}/{ip}:8111 from {user} sending #1
org.apache.hadoop.hdfs.protocolPB.RouterAdminProtocol.addMountTableEntry
DEBUG [{cluster}/{ip}:8111 from {user}] ipc.Client - IPC Client (1826699684)
connection to nn-0-{ns}.{cluster}/{ip}:8111 from {user} got value #1
DEBUG [main] ipc.ProtobufRpcEngine2 - Call: addMountTableEntry took 24ms
DEBUG [{cluster}/{ip}:8111 from {user}] ipc.Client - IPC Client (1826699684)
connection to nn-0-{ns}.{cluster}/{ip}:8111 from {user}: closed
DEBUG [{cluster}/{ip}:8111 from {user}] ipc.Client - IPC Client (1826699684)
connection to nn-0-{ns}.{cluster}/{ip}:8111 from {user}: stopped, remaining
connections 0
TRACE [main] ipc.ProtobufRpcEngine2 - 1: Response <-
nn-0-{ns}.{cluster}/{ip}:8111: addMountTableEntry {status: false}
Cannot add mount point /data503
```
The failure to write new record:
```
INFO [IPC Server handler 0 on default port 8111]
impl.StateStoreZooKeeperImpl - Cannot write record
"/hdfs-federation/MountTable/0SLASH0data503", it already exists
```
Since the successful call has already refreshed cache for all routers,
second call that failed should not have refreshed cache for all routers again
as everyone already has updated records in cache.
--
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]