[
https://issues.apache.org/jira/browse/DRILL-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627723#comment-17627723
]
ASF GitHub Bot commented on DRILL-8299:
---------------------------------------
jnturton commented on PR #2697:
URL: https://github.com/apache/drill/pull/2697#issuecomment-1300446343
> @jnturton Thanks for submitting this. I approved this but what were the
implications of this bug?
@cgivre the bug had a performance implication. A cache recording which
directories already had their modification times checked for the purpose of
determining where Parquet metadata cache files (created by `REFRESH TABLE
METADATA`) need updating was being accessed using objects of wrong type that,
barring an unexpected override of Path.equals(), meant that the cache had a
100% miss rate.
> HashMap key type mismatch in MetadataContext
> --------------------------------------------
>
> Key: DRILL-8299
> URL: https://issues.apache.org/jira/browse/DRILL-8299
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.20.2
> Reporter: PJ Fanning
> Assignee: James Turton
> Priority: Minor
> Fix For: 1.20.3
>
>
> The dirModifCheckMap used in this lookup is keyed using a HDFS Path instance,
> not a string, so this code is not going to work:
> {code:java}
> public boolean getStatus(String dir) {
> if (dirModifCheckMap.containsKey(dir)) {
> return dirModifCheckMap.get(dir);
> }
> return false;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)