Subtract from num bytes in use (#13944)

This commit is contained in:
Stephanie Wang 2021-02-10 12:22:08 -08:00 committed by GitHub
parent 6f9d39fb3e
commit fc89984162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -571,6 +571,10 @@ void PlasmaStore::EraseFromObjectTable(const ObjectID &object_id) {
if (object->device_num == 0) {
PlasmaAllocator::Free(object->pointer, buff_size);
}
if (object->ref_count > 0) {
// A client was using this object.
num_bytes_in_use_ -= object->data_size + object->metadata_size;
}
store_info_.objects.erase(object_id);
}