[
https://issues.apache.org/jira/browse/HDFS-16876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17655614#comment-17655614
]
ASF GitHub Bot commented on HDFS-16876:
---------------------------------------
simbadzina opened a new pull request, #5282:
URL: https://github.com/apache/hadoop/pull/5282
HDFS-16876: Changes cleanup of shared RouterStateIdContext to be driven by
namenodeResolver data.
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
Changes cleanup of shared RouterStateIdContext to be driven by
namenodeResolver data, versus tracking the set of active connection pools.
### How was this patch tested?
New test cases in TestObserverWithRouter.
**testSharedStateInRouterStateIdContext** validates that entries in the
RouterStateIdContext are long lived and not recreated when connectionPools are
deleted. This fails with the previous approach, and passes with the new one.
**testRouterStateIdContextCleanup** validates that the new approach
eventually deletes entries in the map.
### For code changes:
- [ X] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
> Garbage collect map entries in shared RouterStateIdContext using information
> from namenodeResolver instead of the map of active connectionPools.
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-16876
> URL: https://issues.apache.org/jira/browse/HDFS-16876
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: rbf
> Reporter: Simbarashe Dzinamarira
> Assignee: Simbarashe Dzinamarira
> Priority: Critical
>
> When cleaning up stale connection pools, the ConnectionManager also removes
> the associated namespace to stateId mapping from the shared
> RouterStateIdContext. A mapping is only removed when there is no other
> connectionPool referencing it. When a new connection is created, the stateId
> mapping gets recreated.
> Since the RouterStateIdContext is shared across connections, it is cleaner to
> drive its cleanup using the list of namespaces the router references instead
> of closely tracking the active connections.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]