Hi, I get this error when I try to delete a doc ->...
# community-help
b
Hi, I get this error when I try to delete a doc -> "Error deleting document: t: Request failed with HTTP code 404 | Server said: Could not find a document with id: 223". I also can't edit the doc because it shows error that it doesn't exist.
f
If you try to fetch that document, do you get a response back?
b
I get error that the document doesn't exist
f
You must have either never created the document, or deleted it sometime in the past
b
I have created the document, I updated but it's been like it's corrupted now
f
Do you specify the id yourself or is it autogenerated from Typesense?
b
It's autogenerated
f
If you try to search for an indexed field on it, do you get any hits?
b
No the document doesn't appear in any search
I had created the document, I updated via Golang client (v.1.0.0) and then I get this error message
I can;t delete/edit any doc that was updated via the Golang client,
@Kishore Nallan @Jason Bosco Could you check this issue? It's a critical bug.
k
Unless you can reproduce this issue consistently there is very little to go by. If there is a serious issue on a fundamental operation like deletion it would have been reported already by now. Maybe there's an edge case but unless there's a reproducible step we can't really guess what could be going wrong.
b
I think I found the cause of the issue, I had inserted some docs when I migrated my cluster to an SDN Cluster. These docs had a specific id. I get this error only in these docs ("id not found")
The issue now is that I can't edit, retrieve them or delete them because I get error (id not found)
k
You probably didn't sync up the nodes properly so those nodes probably don't have the data.
b
I use Typesense cloud
I checked each node and I get the same error:
Copy code
{
  "message": "Could not find a document with id: 223"
}
k
If there is an ingestion error during insertion we should have returned an error to the client.
The document doesn't exist uniformly on none of the nodes?
b
Yes it doesn't exist in any of the nodes
It appears in ui dashboard and when I search for all documents. But I can't delete it, retrieve it or edit it
k
Are you saying it appears while searching in ui dashboard?
b
yes
k
I can try doing a rolling restart of all typesense servers.
Please DM me the cluster id
b
Will any data be erased?
k
It will ensure that the in-memory indices are in sync with what's on disk. Since we don't know what the initial errors were, we can't say.
b
is there any downtime?
I have cretaed a ticket with subject : "Error deleting/editing document"
k
The ticket does not provide a cluster ID.
b
I sent you the cluster ID
Attached in the ticket
k
Ok got it, didn't see the follow up
Will rotate the
-1
node first. Once you confirm, we can proceed to rest.
It's back up.
b
What do you want to confirm?
k
Check if you are facing the same issue on this node by querying
-1
directly?
b
can you send me the curl
k
You can find the curl examples in the docs.
Not sure what you will be using, so best to refer to docs.
I will complete the rotation of the other two nodes meanwhile because it's anyway better to have that in sync.
b
Okay
I searched for the document in 3 nodes and the document still exists
but when i try to retrieve it i get the same error: { "message": "Could not find a document with id: 223" }
k
Please post both the curl command used for search and the individual document ID requested. You can omit the host name
b
I sent it to the ticket: Error deleting document
k
Tried digging into what could have gone wrong, but it seems like only a part of the index seems to be persisted (the ones that are accessed during search but not during individual document gets or other operations). We've never faced this type of inconsistency in writes before and the code also does an atomic write for both of these indices. So not sure what could have happened. The only way to recover is to reindex these documents. You can export and reimport them.
b
So the only way is to delete the collection and reindex all the documents?
k
Yes
b
So is it better to use custom ids instead of autogenerated?
k
The issue is not related to use of autogenerated IDs.