Log sequence numbers in Python SDK

The docs for the API indicate that the Log Sequence Number can be obtained from the headers of the response: Check data freshness - Pinecone Docs

However, the Python SDK (GitHub - pinecone-io/pinecone-python-client: The Pinecone Python client) does not expose this, at the very least not in the asyncio part of the SDK, and the alternative approach seems incredibly unideal as you’d essentially have to check the count of an entire namespace to compare against our expected record count (which has other drawbacks). Is there a way to get this header, both for upserts and for describe-index-stats, via the Python SDK? Or would the recommendation be to simply build the request by hand instead, and skip using the SDK entirely?

1 Like

Bumping this. Would love to see an answer here as well.

Hi @ajohnston,

Welcome to the Pinecone forum, and apologies for the delayed response.

There’s currently no way to get that header in SDK responses, but I’ll share this ask with the team.

Can you share more about your scenario? It’s important to remember that Pinecone is an eventually consistent database, but we are making improvements with freshness speeds all the time. In fact, we are rolling out an optimized serverless architecture starting this week that will soon improve freshness noticeably. Eventually, the new architecture may enable strongly consistent reads. If you’re interested, you can read more about the new architecture here and here.

Best wishes,
Jesse