You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@geaflow.apache.org by GitBox <gi...@apache.org> on 2026/08/11 03:41:31 UTC
[GH] (geaflow/feature/resident-keyword-index): Workflow run "Java CI with Maven On JDK 8" is working again!
The GitHub Actions job "Java CI with Maven On JDK 8" on geaflow.git/feature/resident-keyword-index has succeeded.
Run started by GitHub user E2ern1ty (triggered by Leomrlin).
Head commit for run:
fe6a71a6267d6638717000d3e7150e3ac8bb1a4e / 戚宏成 <qi...@hellobike.com>
fix(ai): address review on the resident keyword index
Four defects found in review, each with a regression test that fails without
the fix.
Index follows the graph, not the reported object. A reported entity is a
request the graph may have rejected: VertexGroup.addVertex refuses a duplicate
id, and a failed mutation still advances the version, so the version window
passed and the rejected object was indexed. The new text then matched while
retrieval resolved and returned the vertex the graph had kept, and the text
actually in the graph stopped being searchable. ResidentSearchIndex now
resolves every reported entity through the accessor and indexes what the graph
holds, dropping the document when the graph holds nothing; upsert and remove
share that one path, so the graph decides the outcome rather than which hook
was called. GeaFlowMemoryServer checks mutation results and reports only what
was accepted, on the delete path too, where reporting a rejected removal would
have dropped a document that is still supposed to be searchable.
Collision free entity key. getGraphEntityKey is the Lucene primary key, but it
plainly concatenated id and label, so (id="a", label="bc") and (id="ab",
label="c") both yielded Vabc and a write to one destroyed the other's
document. Components are now length prefixed, which makes the encoding
parseable and therefore injective. Index files written with the old encoding
are still read: the legacy key is accepted as a fallback, and where two
entities share one it is dropped rather than guessed. Verified against a real
embedding service, an existing index file matches all its entries by the
legacy key, requests no new embeddings, and returns identical results.
Build snapshot is verified before publication. The vertex version was sampled
only before the full scan, so a concurrent write produced a snapshot that
could not be attributed to that version, and the query that triggered the
build answered from a graph state that never existed. The version is now read
again after the scan and the store is published only when the two agree,
otherwise the attempt is discarded and retried. If no stable snapshot can be
obtained the index is published as unverified so later queries rebuild instead
of reusing it. Adds getDiscardedBuildCount.
Cache entries are bound to content. Entity equality is label and id only, so a
caller holding a superseded wrapper shared a cache key with the current one:
the stale text was computed, stored under the current version, and served to
the next lookup as a hit. Entries now carry the content they were computed
from and a hit requires it to match. The contract is documented: the store
returns the index of the entity handed to it, and callers needing the graph's
current entity must resolve it first, as the resident index now does.
Also records in the design doc that the equivalence claim is against the
per-query rebuild path and does not mean keyword matching itself is correct:
SessionOperator builds the query string with KeywordVector.toString(), so a
query issued through the service carries tokens every document also has and
matches everything. That line predates this work and is untouched here; both
compared paths take the same query string and the tests pass unwrapped ones.
Report URL: https://github.com/apache/geaflow/actions/runs/31372614353
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: builds-unsubscribe@geaflow.apache.org
For additional commands, e-mail: builds-help@geaflow.apache.org