mirror of
https://github.com/typesense/typesense.git
synced 2025-05-25 16:26:38 +08:00
Add guard for collection document counter decrement.
This commit is contained in:
parent
b3db94867f
commit
a3d7b9a24a
@ -4467,7 +4467,9 @@ void Collection::remove_document(const nlohmann::json & document, const uint32_t
|
||||
std::unique_lock lock(mutex);
|
||||
|
||||
index->remove(seq_id, document, {}, false);
|
||||
num_documents -= 1;
|
||||
if(num_documents != 0) {
|
||||
num_documents -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(remove_from_store) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user