Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Expose the index LSN (x-pinecone-max-indexed-lsn) for robust freshness verification #470

Open
Amayas29 opened this issue Mar 26, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request status:backlog This issue has been added to our backlog

Comments

@Amayas29
Copy link

What motivated you to submit this feature request?
We need a reliable way to verify whether recent write operations are visible to queries. The use of vector count comparison fails when insert/delete operations offset each other (e.g., inserting 5 and deleting 5 documents leaves the count unchanged). An LSN in index statistics would provide more robust verification of freshness.

Describe the solution you'd like
Expose the index lsn (x-pinecone-max-indexed-lsn) in describe_index_stats()

Describe alternatives you've considered
We currently use vector count comparison to detect ingestion freshness

write operations (upsert/delete) code:

# Store the count before write operation
initial_count = (
  index.describe_index_stats()
  .get("namespaces", {})
  .get(namespace, {})
  .get("vector_count", None)
)

index.upsert(...)  

Search code:

count = (
  index.describe_index_stats()
  .get("namespaces", {})
  .get(namespace, {})
  .get("vector_count", None)
)

if count == initial_count:
  LOGGER.warning(
      "Recently ingested documents may not yet be visible to queries "
      "due to Pinecone's indexing delay."
  )
  # Potentially followed by a sleep to await visibility.
@Amayas29 Amayas29 added the enhancement New feature or request label Mar 26, 2025
@github-actions github-actions bot added the status:needs-triage An issue that needs to be triaged by the Pinecone team label Mar 26, 2025
@anawishnoff anawishnoff self-assigned this Apr 3, 2025
@anawishnoff
Copy link
Contributor

Hey @Amayas29 thank you for opening. We know that eventual consistency can pose this problem for users and are investigating internally to figure out the best way to add more flexibility and visibility into this workflow. While I don't have an update to share yet, I'll circle back if we decide to go with the route of exposing the LSN.

@anawishnoff anawishnoff added status:backlog This issue has been added to our backlog and removed status:needs-triage An issue that needs to be triaged by the Pinecone team labels Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status:backlog This issue has been added to our backlog
Projects
None yet
Development

No branches or pull requests

2 participants