This is an automated email from the ASF dual-hosted git repository.
mboehm7 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/master by this push:
new bc11501 [SYSTEMDS-2670] Fix null-pointer in remote parfor w/ disabled
caching
bc11501 is described below
commit bc11501cac9513bd81f898ffd635e8d96767eb6a
Author: Matthias Boehm <[email protected]>
AuthorDate: Tue Sep 22 16:43:57 2020 +0200
[SYSTEMDS-2670] Fix null-pointer in remote parfor w/ disabled caching
This patch fixes an edge case, where the parfor optimizer disabled
caching and thus eviction, but runs into a null-pointer exception on
synchronization on a non-initialized buffer pool data structure.
The main code path was guarded from outside against this case, but there
is a second entry point which missed the guard. Now we have it inside
CacheableData before calling the buffer pool.
---
.../org/apache/sysds/runtime/controlprogram/caching/CacheableData.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/sysds/runtime/controlprogram/caching/CacheableData.java
b/src/main/java/org/apache/sysds/runtime/controlprogram/caching/CacheableData.java
index 4d0d5d9..e5fc8d4 100644
---
a/src/main/java/org/apache/sysds/runtime/controlprogram/caching/CacheableData.java
+++
b/src/main/java/org/apache/sysds/runtime/controlprogram/caching/CacheableData.java
@@ -919,7 +919,8 @@ public abstract class CacheableData<T extends CacheBlock>
extends Data
LOG.trace("CACHE: Freeing evicted matrix... " +
hashCode() + " HDFS path: " +
(_hdfsFileName == null ? "null" :
_hdfsFileName) + " Eviction path: " + cacheFilePathAndName);
- LazyWriteBuffer.deleteBlock(cacheFilePathAndName);
+ if(isCachingActive())
+ LazyWriteBuffer.deleteBlock(cacheFilePathAndName);
if( LOG.isTraceEnabled() )
LOG.trace("Freeing evicted matrix - COMPLETED ... " +
(System.currentTimeMillis()-begin) + " msec.");