GeezerVison is showing github.com — "Bucket with id '-4' was not found" · Issue #947 · ArcadeData/arcadedb
"Bucket with id '-4' was not found" #947DescriptionArcadeDB Version: both v23.1.2 and v23.2.1
Using Cypher
Sometimes, the database gets into a bricked state where you can't run certain types of queries / queries over certain pieces of data. For example, running a MATCH all works, but running a MATCH (n) DETACH DELETE n doesn't. You get an error "Bucket with id '-1' was not found" in v23.1.2 and "Bucket with id '-4' was not found" in the latest version. You have to drop that database and re-create it.
The only way I can reproduce this is:
- Run a big query X in session A
- After query finishes, immediately open another small query Y in session B
My guess would be that somehow, the data from query X is still being saved to disk or something but then query Y sort of has a race-condition with it. If you repeat the same steps, but wait 5 seconds between step 1 and step 2, it never happens. Activityshasaur commented on Mar 16, 2023 ContributorAuthor More actions It mainly consistently happens when I run my golang test suites (as there is a session opened per test and there are a lot of tests that run immediately after each other).
However, I think I've seen this happened after heavy production use once or twice. This could be due to having multiple sessions open in my golang program. lvca commented on Mar 17, 2023 Do you have the stack trace of the exception? It would be very helpful to find the cause. lvca commented on Jun 9, 2023 Any news on this? Closing this issue as resolved. In case please comment here to be reopened. artturimatias commented on Jan 12, 2024 I think I'm hitting this same issue. This randomly happens when I'm trying remove all but "Schema" nodes from database via gremlin (sort of data reset).
Tested with 23.12.2 (docker)
"command":"g.V().not(hasLabel(\\"Schema\\")).drop()","language":"gremlin"
This results (sometimes):
`
com.arcadedb.exception.SchemaException: Bucket with id '-1' was not found
at com.arcadedb.schema.LocalSchema.getBucketById(LocalSchema.java:289)
at com.arcadedb.database.LocalDatabase.lambda$lookupByRID$14(LocalDatabase.java:687)
at com.arcadedb.database.LocalDatabase.executeInReadLock(LocalDatabase.java:1415)
at com.arcadedb.database.LocalDatabase.lookupByRID(LocalDatabase.java:668)
at com.arcadedb.database.RID.asEdge(RID.java:153)
at com.arcadedb.graph.EdgeIterator.next(EdgeIterator.java:84)
at com.arcadedb.graph.EdgeIterator.next(EdgeIterator.java:30)
at com.arcadedb.graph.GraphEngine.deleteVertex(GraphEngine.java:391)
at com.arcadedb.database.LocalDatabase.deleteRecordNoLock(LocalDatabase.java:1005)
at com.arcadedb.database.LocalDatabase.lambda$deleteRecord$20(LocalDatabase.java:973)
at com.arcadedb.database.LocalDatabase.executeInReadLock(LocalDatabase.java:1415)
at com.arcadedb.database.LocalDatabase.deleteRecord(LocalDatabase.java:972)
at com.arcadedb.gremlin.ArcadeGraph.deleteElement(ArcadeGraph.java:449)
at com.arcadedb.gremlin.ArcadeElement.remove(ArcadeElement.java:89)
at org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropStep.filter(DropStep.java:67)
at org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.processNextStart(FilterStep.java:41)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:192)
at com.arcadedb.gremlin.ArcadeGremlin$2.hasNext(ArcadeGremlin.java:112)
at com.arcadedb.query.sql.executor.IteratorResultSet.hasNext(IteratorResultSet.java:37)
at com.arcadedb.query.sql.executor.ResultSet.tryAdvance(ResultSet.java:69)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.arcadedb.server.http.handler.AbstractQueryHandler.serializeResultSet(AbstractQueryHandler.java:163)
at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:114)
at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:100)
at com.arcadedb.server.http.handler.AbstractServerHttpHandler.handleRequest(AbstractServerHttpHandler.java:127)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
at java.base/java.lang.Thread.run(Thread.java:829)
`
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|