Slow Document Deletion in Typesense Database
TLDR Robert inquired about speeding up deletes in Typesense. Robert agreed to file a detailed bug report following the discussion with Kishore Nallan who is investigating a possible bug causing the delay in document deletion.
1
1
Feb 07, 2022 (21 months ago)
Robert
01:35 AMDELETE
Kishore Nallan
01:41 AMRobert
01:44 AM{
filename : { type : "string" },
size : { type : "int64" },
nsfw : { type : "int32" },
itemid : { type : "int32", facet : true },
catid : { type : "int32", facet : true },
genreid : { type : "int32", facet : true },
family : { type : "string", facet : true },
formatid : { type : "string", facet : true, optional : true },
ts : { type : "int64", optional : true },
content : { type : "string", optional : true },
ext : { type : "string", optional : true },
label : { type : "string[]", optional : true },
duration : { type : "int32", optional : true },
width : { type : "int32", optional : true },
height : { type : "int32", optional : true },
animated : { type : "bool", optional : true },
title : { type : "string", optional : true },
subCount : { type : "int32", optional : true, index : false },
href : { type : "string", optional : true, index : false },
contentURL : { type : "string", optional : true, index : false },
extra : { type : "string", optional : true, index : false }
}
Robert
01:44 AMRobert
01:46 AMfilter_by
is simply itemid:<number>
that matches a few thousand files out of 3.9 million total.Kishore Nallan
01:46 AMKishore Nallan
01:48 AMRobert
01:49 AMDELETE
call on <server>/collections/<name>/documents?batch_size=1000&filter_by=itemid:<num>
with a single id. There are no other searches happening at the time, there are no other operations of any kind taking place.Kishore Nallan
01:50 AMRobert
02:02 AMRobert
02:03 AM.jsonl
files that can be used to re-create the DB?Robert
02:04 AMRobert
02:13 AMKishore Nallan
02:33 AMKishore Nallan
02:33 AMRobert
03:23 AMKishore Nallan
03:26 AMRobert
03:53 AM1
1
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Slow, High CPU Write Operations After Collection Drop in Typesense
Himank discussed an issue in Typesense where deleting and recreating a collection led to slow write operations and high CPU usage. Kishore Nallan suggested using an alias to avoid this issue. Numerous tests and debugging was conducted as pboros contributed with local testing. Kishore Nallan aimed to start implementing a range delete and full db compaction after deletion to potentially solve the issue.
Issue with Typesense Schema and Ruby Client
Mateo faces issues while creating a schema and using Ruby client for Typesense. Jason suggests using a new field instead of 'id' and provides assistance for Ruby client errors.
Typesense Cloud Issue: Unable to Delete Documents by ID
Ellen had trouble using Typesense Cloud's `filter_by` option to delete documents by id. Jason solved this by suggesting to remove double-quotes around IDs in `filter_by` clause.
Revisiting Typesense for Efficient DB Indexing and Querying
kopach experienced slow indexing and crashes with Typesense. The community suggested to use batch import and check the server's resources. Improvements were made but additional support was needed for special characters and multi-search queries.
Issue with Search Duration on Typesense Database
Robert reported an issue about query time delay when adding a `filter_by` constraint in a large Typesense database. Kishore Nallan explained that this happens due to the order of operation and also promised to look into this issue further. Robert withdrew his interest in sponsoring the improvement due to moving from the project.