Skip to content

Vector is missing for neighbor to repair #1209

@poldz123

Description

@poldz123

Is there an existing issue?

Build info

  • ObjectBox version: 4.2.0
  • OS: Android 15
  • Device/ABI/architecture: Pixel 6 Pro

Steps to reproduce

  1. Save data with vector @HnswIndex(dimensions = 2, distanceType = VectorDistanceType.GEO)
  2. Save at least a couple of thousand of them
  3. And delete all of them

Expected behavior

I should be able to remove all of them without exception.

Actual behavior

An exception is being thrown (see logs below), and the data still persists. There's currently no way to delete all of it via a query. I want to avoid clearing the entire database entity.

Code

sampleEntity.store.runInTx {
    val query = scheduleEntity.query(
        (SampleEntity_.sampleId equal operator.sampleId)
    ).build()
    query.remove()
    query.close()
}
Code
[Paste your code here]

Logs, stack traces

java.lang.IllegalStateException: Vector is missing for neighbor to repair 27900; level: 2, removed: 29219, neighbor's degree: 1
at io.objectbox.query.Query.nativeRemove(Native Method)
at io.objectbox.query.Query.lambda$remove$11$io-objectbox-query-Query(Query.java:918)
at io.objectbox.query.Query$$ExternalSyntheticLambda1.call(D8$$SyntheticClass:0)
at io.objectbox.Box.internalCallWithWriterHandle(Box.java:757)
at io.objectbox.query.Query.remove(Query.java:918)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions