You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
I have a function that programmatically creates a pinecone index. It should be resolved only once the index is "ready" for upserting.
asynccreateIndex(owner: string,repo: string){constname=this.getIndexName(owner,repo)awaitthis.client.createIndex({createRequest: {
name,dimension: 1536,},})constcheckStatus=async()=>{const{ status }=awaitthis.client.describeIndex({indexName: name,})if(status?.state===IndexMetaStatusStateEnum.Ready){returnstatus}else{returnnewPromise((resolve)=>{setTimeout(()=>resolve(checkStatus()),5000)})}}conststatus=awaitcheckStatus()returnthis.getIndex(owner,repo)}
However, I experience an issue with this approach: even though the status returns me state: "Ready", the upserting command fails. If I create an index manually, the upserting works as intended. Hence, I think the issue is inside the logic that switches state to Ready way too early.
Expected Behavior
index's state switches to "Ready" only when index can be used for operations like upsert.
Steps To Reproduce
Create a sample node application
Install pinecone
Create an instance of the pinecone using new PineconeClient()
Call .createIndex with arbitrary parameters. For example,
Is this a new bug?
Current Behavior
I have a function that programmatically creates a pinecone index. It should be resolved only once the index is "ready" for upserting.
However, I experience an issue with this approach: even though the status returns me
state: "Ready"
, the upserting command fails. If I create an index manually, the upserting works as intended. Hence, I think the issue is inside the logic that switches state toReady
way too early.Expected Behavior
index's state switches to "Ready" only when index can be used for operations like upsert.
Steps To Reproduce
new PineconeClient()
.createIndex
with arbitrary parameters. For example,Ready
Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: