Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception in logs #134

Closed
fblaha opened this issue Feb 21, 2019 · 8 comments
Closed

exception in logs #134

fblaha opened this issue Feb 21, 2019 · 8 comments
Assignees
Labels
Milestone

Comments

@fblaha
Copy link

fblaha commented Feb 21, 2019

java.lang.IllegalStateException: Chunk 384110 no longer exists [1.4.197/9]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:870) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.MVStore.getChunkIfFound(MVStore.java:919) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.MVStore.getChunk(MVStore.java:901) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.MVStore.readPage(MVStore.java:1927) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.MVMap.readPage(MVMap.java:698) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.Page.getChildPage(Page.java:208) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.Cursor.fetchNext(Cursor.java:150) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.Cursor.next(Cursor.java:50) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.MVMap$2$1.next(MVMap.java:841) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.MVMap$2$1.next(MVMap.java:832) ~[h2-mvstore-1.4.197.jar!/:na]
at org.dizitart.no2.filters.LesserEqualFilter.matchedSet(LesserEqualFilter.java:73) ~[nitrite-3.1.0.jar!/:na]
at org.dizitart.no2.filters.LesserEqualFilter.apply(LesserEqualFilter.java:66) ~[nitrite-3.1.0.jar!/:na]
at org.dizitart.no2.objects.filters.LesserEqualObjectFilter.apply(LesserEqualObjectFilter.java:59) ~[nitrite-3.1.0.jar!/:na]
at org.dizitart.no2.filters.BaseFilter$1.call(BaseFilter.java:60) ~[nitrite-3.1.0.jar!/:na]
at org.dizitart.no2.filters.BaseFilter$1.call(BaseFilter.java:56) ~[nitrite-3.1.0.jar!/:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

2019-02-21 12:32:47.875 ERROR 1 --- [ Worker.NO₂] org.dizitart.no2.filters.BaseFilter : Error while executing filter GreaterEqualObjectFilter(field=openDate, value=2019-02-14T12:32:46.077990Z)

java.lang.IllegalStateException: Chunk 384110 no longer exists [1.4.197/9]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:870) ~[h2-mvstore-1.4.197.jar!/:na]
at org.h2.mvstore.MVStore.getChunkIfFound(MVStore.java:919) ~[h2-mvstore-1.4.197.jar!/:

@anidotnet
Copy link
Contributor

Can you please provide a reproducible code? Meantime disable auto compaction and try. Use disableAutoCompact() in NitriteBuilder.

@fblaha
Copy link
Author

fblaha commented Feb 23, 2019

I am not able to give you reproducible code. Auto-compaction is disabled. The code initializing DB is here https://github.com/fblaha/manaus/blob/20e17221f713a5120f9f12d9ca2d0e4d6edfe790/mns-core/src/main/java/cz/fb/manaus/spring/CoreDatabaseConfiguration.kt#L29-L35 . The compaction is launched during spring context initialization. Additional context:

  1. database is quite huge ~ 6 GB
  2. the issue started to appear recently not from the beginning when the DB was smaller
  3. I am not observing any harmful impact on the app except those exceptions in log. The app works well even DB performance seems to be quite good despite the DB size

@anidotnet
Copy link
Contributor

Can you add this below dependency and recheck?

<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2-mvstore</artifactId>
    <version>1.4.198</version>
</dependency>

"Chunk XXXXX no longer exit" error is very common in h2 database and hence mvstore when db is quite large. They resolved such issues recently. So please try with the recent version of their store.

@fblaha
Copy link
Author

fblaha commented Feb 23, 2019

compact() method does not work with version 1.4.198 . It is probably caused by changed signature of compactMoveChunks. In 1.4.198 was removed synchronized from method signature

https://github.com/h2database/h2database/blob/version-1.4.198/h2/src/main/org/h2/mvstore/MVStore.java#L1853 vs
https://github.com/h2database/h2database/blob/version-1.4.197/h2/src/main/org/h2/mvstore/MVStore.java#L1597

2019-02-23 19:19:55.877 ERROR 2676 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

An attempt was made to call the method org.h2.mvstore.MVStore.compactMoveChunks()Z but it does not exist. Its class, org.h2.mvstore.MVStore, is available from the following locations:

jar:file:/C:/Users/fb/.m2/repository/com/h2database/h2-mvstore/1.4.198/h2-mvstore-1.4.198.jar!/org/h2/mvstore/MVStore.class

It was loaded from the following location:

file:/C:/Users/fb/.m2/repository/com/h2database/h2-mvstore/1.4.198/h2-mvstore-1.4.198.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.h2.mvstore.MVStore

@fblaha
Copy link
Author

fblaha commented Feb 23, 2019

according to java spec it should not happen so I am not sure why it happened in my case. I am using java 11
"Adding or deleting a synchronized modifier of a method does not break compatibility with pre-existing binaries."

@anidotnet
Copy link
Contributor

anidotnet commented Feb 25, 2019

Can you try with the latest snapshot - 3.2.0-SNAPSHOT? I have updated the dependency to the latest mvstore.

@fblaha
Copy link
Author

fblaha commented Feb 25, 2019

I built 3.2.0-SNAPSHOT from the latest master. At first glance, everything looks good. I need to observe it a few days whether exception appears again. I will let you know

@fblaha
Copy link
Author

fblaha commented Feb 27, 2019

The exception has not appeared in logs since the update to h2-mvstore-1.4.198 so it seems the fix works. Thanks

@anidotnet anidotnet self-assigned this Feb 27, 2019
@anidotnet anidotnet added the bug label Feb 27, 2019
@anidotnet anidotnet added this to the 3.2.0 milestone Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants