You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to upsert a large collection that contains new and updated items the operation will fail.
Failed to acquire lock for collection file X.json
java.nio.channels.ClosedChannelException: null
at java.base/sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:160) ~[?:?]
at java.base/sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1463) ~[?:?]
at java.base/java.nio.channels.FileChannel.lock(FileChannel.java:1240) ~[?:?]
at io.jsondb.io.JsonWriter.acquireLock(JsonWriter.java:101) ~[jsondb-core-1.0.115-j11.jar:?]
at io.jsondb.io.JsonWriter.updateInJsonFile(JsonWriter.java:601) ~[jsondb-core-1.0.115-j11.jar:?]
at io.jsondb.JsonDBTemplate.upsert(JsonDBTemplate.java:1257) ~[jsondb-core-1.0.115-j11.jar:?]
at io.jsondb.JsonDBTemplate.upsert(JsonDBTemplate.java:1194) ~[jsondb-core-1.0.115-j11.jar:?]
After the items get appended, the file channel will get closed, causing the update to fail since its unable to obtain the file lock.
If you try to upsert a large collection that contains new and updated items the operation will fail.
After the items get appended, the file channel will get closed, causing the update to fail since its unable to obtain the file lock.
jsondb-core/src/main/java/io/jsondb/JsonDBTemplate.java
Lines 1257 to 1268 in 12b2c72
jsondb-core/src/main/java/io/jsondb/io/JsonWriter.java
Lines 114 to 132 in 12b2c72
jsondb-core/src/main/java/io/jsondb/io/JsonWriter.java
Lines 99 to 112 in 12b2c72
The text was updated successfully, but these errors were encountered: