Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-3678

CacheStateChecker may remove a cache file that under building

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v2.4.0, v2.4.1, v2.5.0, v2.5.1
    • v2.5.2
    • Job Engine
    • None

    Description

      Kylin test failed with such error:

      2018-11-09 02:15:24,379 DEBUG [main] cachesync.CachedCrudAssist:127 : Loaded 1 ExternalFilterDesc(s) out of 1 resource
      2018-11-09 02:15:24,380 WARN  [main] common.KylinConfigBase:77 : KYLIN_HOME was not set
      2018-11-09 02:15:24,380 INFO  [main] cache.RocksDBLookupBuilder:66 : create new rocksdb folder:lookup_cache/rocksdb/DEFAULT.TEST_COUNTRY/f19bc17c-d41d-a4be-b561-f6bd275f4c90/db for table cache:DEFAULT.TEST_COUNTRY
      2018-11-09 02:15:24,380 INFO  [main] cache.RocksDBLookupBuilder:69 : start to build lookup table:DEFAULT.TEST_COUNTRY to rocks db:lookup_cache/rocksdb/DEFAULT.TEST_COUNTRY/f19bc17c-d41d-a4be-b561-f6bd275f4c90/db
      2018-11-09 02:15:26,814 WARN  [lookup-cache-state-checker-1] common.KylinConfigBase:77 : KYLIN_HOME was not set
      2018-11-09 02:15:26,814 INFO  [lookup-cache-state-checker-1] cache.RocksDBLookupTableCache:334 : check snapshot local cache state, local path:lookup_cache/rocksdb
      2018-11-09 02:15:26,814 INFO  [lookup-cache-state-checker-1] cache.RocksDBLookupTableCache:361 : removed cache file:/var/jenkins/workspace/kylin-manual-ci/core-dictionary/lookup_cache/rocksdb/DEFAULT.TEST_COUNTRY/f19bc17c-d41d-a4be-b561-f6bd275f4c90, it is not referred by any cube
      2018-11-09 02:15:28,474 ERROR [main] cache.RocksDBLookupBuilder:77 : error when put data to rocksDB
      org.rocksdb.RocksDBException: While open a file for random read: lookup_cache/rocksdb/DEFAULT.TEST_COUNTRY/f19bc17c-d41d-a4be-b561-f6bd275f4c90/db/000018.sst: No such file or directory
      	at org.rocksdb.RocksDB.put(Native Method)
      	at org.rocksdb.RocksDB.put(RocksDB.java:453)
      	at org.apache.kylin.dict.lookup.cache.RocksDBLookupBuilder.build(RocksDBLookupBuilder.java:74)
      	at org.apache.kylin.dict.lookup.cache.RocksDBLookupTableCacheTest.testRestoreCacheFromFiles(RocksDBLookupTableCacheTest.java:115)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
      

       

       Search "f19bc17c-d41d-a4be-b561-f6bd275f4c90" you will find that, thread "main" created this folder and is building the file, at this moment, the "lookup-cache-state-checker-1" thread mark this folder as "not-in-use" and deleted it. Then caused the main thread failed to write the file.

      Attachments

        Activity

          People

            shaofengshi Shao Feng Shi
            shaofengshi Shao Feng Shi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: