[ 
https://issues.apache.org/jira/browse/SAMZA-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210655#comment-16210655
 ] 

Prateek Maheshwari commented on SAMZA-1466:
-------------------------------------------

This happens intermittently because:
1. RocksDB throws an exception if open is called on a store that's already open.
2. A new unit test was added in PR #327 that didn't close the store.
3. Other tests in this class use the same store directory 
(System.getProperty("java.io.tmpdir")) and run concurrently. Any test that runs 
after the one in 2 above fail.

Even when we log the RocksDBException (fixed in pr #332), the actual exception 
message is malformed due to a bug in RocksDB: 
https://github.com/facebook/rocksdb/issues/1688. This is fixed in the latest 
RocksDB version (verified with 5.8.0), so the messages should be more 
meaningful after an upgrade. Fixed stack trace says something like:
{code}
Caused by: org.rocksdb.RocksDBException: While lock file: 
/var/folders/1b/4nqqvf4s27sby0frjr0q5t_h0004hp/T/LOCK: No locks available
        at org.rocksdb.RocksDB.open(Native Method)
        at org.rocksdb.RocksDB.open(RocksDB.java:231)
        at 
org.apache.samza.storage.kv.RocksDbKeyValueStore$.openDB(RocksDbKeyValueStore.scala:70)
{code}

> Flaky test: TestRocksDbKeyValueStore suite
> ------------------------------------------
>
>                 Key: SAMZA-1466
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1466
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Prateek Maheshwari
>            Assignee: Prateek Maheshwari
>
> {code}
> :samza-kv-rocksdb_2.11:testPicked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
> testFlush FAILED
>     org.apache.samza.SamzaException: Error opening RocksDB store dbStore at 
> location /tmp, received the following exception from RocksDB 
> org.rocksdb.RocksDBException: "
>         at 
> org.apache.samza.storage.kv.RocksDbKeyValueStore$.openDB(RocksDbKeyValueStore.scala:99)
>         at 
> org.apache.samza.storage.kv.TestRocksDbKeyValueStore.testFlush(TestRocksDbKeyValueStore.scala:73)
> 5 tests completed, 1 failed
> :samza-kv-rocksdb_2.11:test FAILED
> {code}
> Currently log message doesn't contain the original exception. Let's fix the 
> logging first.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to