[
https://issues.apache.org/jira/browse/HADOOP-18546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645379#comment-17645379
]
ASF GitHub Bot commented on HADOOP-18546:
-----------------------------------------
steveloughran commented on PR #5205:
URL: https://github.com/apache/hadoop/pull/5205#issuecomment-1344508771
how to use this
```scala
//
********************************************************************************************
// probe a FS for the bug using path capabilities checks
//
********************************************************************************************
def isVulnerable(fspath: String): Boolean = {
val p = path(fspath)
if (!Set("abfs", "abfss").contains(p.toUri.getScheme)) {
println("not an azure filesystem")
return false;
}
val targetFS = bind(p);
if (!targetFS.hasPathCapability(p, "fs.capability.paths.acls")) {
println("The release predates the bugs addition to the codebase")
return false;
}
if (!targetFS.hasPathCapability(p, "HADOOP-18546")) {
println("The release has the HADOOP-18546 fix")
return false;
}
println("The release is recent enough to contain the bug, and does not
have the fix")
val fsconf = targetFS.getConf
if (fsconf.getBoolean("fs.azure.enable.readahead", false)) {
println("readahead disabled (cloudera releases and hadoop 3.3.5+)")
return false;
}
val depth = "fs.azure.readaheadqueue.depth"
val queue = fsconf.getInt(depth, -1)
if (queue == 0) {
println(s"${depth} set to 0: safe")
return false;
}
queue match {
case -1 =>
println(s"${depth} will be the default: unsafe")
true;
case 0 =>
println(s"${depth} set to zero: safe")
false
case _ =>
println(s"${depth} set to ${queue}: unsafe")
false
}
}
```
> disable purging list of in progress reads in abfs stream closed
> ---------------------------------------------------------------
>
> Key: HADOOP-18546
> URL: https://issues.apache.org/jira/browse/HADOOP-18546
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.3.4
> Reporter: Steve Loughran
> Assignee: Pranav Saxena
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0, 3.3.5
>
>
> turn off the prune of in progress reads in
> ReadBufferManager::purgeBuffersForStream
> this will ensure active prefetches for a closed stream complete. they wiill
> then get to the completed list and hang around until evicted by timeout, but
> at least prefetching will be safe.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]