[C API] Versioned, documented compatibility for the save/load stream format

Offen
#426 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 5 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
18/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
c, cpp
Bereich
api, backend

Rechercherichtung

Start with svs_get_version() in bindings/c/src/svs_c.cpp (line 69) and the save_version field in dynamic_index.h, which is currently 0.0.0. Trace svs_index_save_stream and svs_index_load_stream_dynamic to see where a format version would go in the stream header. Done means a format version is written and readable without loading the index, and a mismatched stream returns an error rather than crashing. The compatibility contract also needs a decision from maintainers before code work starts.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Summary

Please version the byte stream produced by svs_index_save_stream and consumed by svs_index_load_stream_dynamic, independently of the C API version, and document which versions a given release can load.

Why

valkey-search embeds the SVS stream in its RDB files. Users upgrade the module (and so SVS) in place, and replicas can briefly run a different build from the primary. Today the only version available to us is svs_get_version(), the C API version (bindings/c/src/svs_c.cpp:69); the serialized save_version in dynamic_index.h is 0.0.0. So we can't tell "same format, newer library" from "incompatible format", and have to either reject every RDB after any SVS bump or risk loading an incompatible stream.

Ask

  1. A format version in the stream header, and a C API call to read it from a stream without loading the index, or to report it from a handle.
  2. A compatibility contract: a release can load streams written by earlier releases within the same major format version, and fails cleanly (an error, not a crash) on a stream it can't load.
  3. Release notes that call out format version changes.

Consumer context

valkey-search (ALGORITHM SVS_VAMANA), C API submodule pinned at 8285340. Today vector_svs.cc rejects any svs_get_version() mismatch on load. With a format version we can accept compatible streams and rebuild from the keyspace otherwise.

Vorherrschende Sprache
C++
Sterne
241
Forks
48
Ø Merge
4 T. 21 Std.
Gemergte PRs (30 T.)
11

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus intel/ScalableVectorSearch

Alle Issues in intel/ScalableVectorSearch

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.