jonasmao opened a new issue, #3074: URL: https://github.com/apache/kvrocks/issues/3074
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/kvrocks/issues) and found no similar issues. ### Version v2.12.1 ### Minimal reproduce step find the code: ``rocksdb::Status Hash::Delete(engine::Context &ctx, const Slice &user_key, const std::vector<Slice> &fields, uint64_t *deleted_cnt) { *deleted_cnt = 0; std::string ns_key = AppendNamespacePrefix(user_key); ... HashMetadata metadata(false); ... s = GetMetadata(ctx, ns_key, &metadata); if (!s.ok()) return s.IsNotFound() ? rocksdb::Status::OK() : s; ... if (*deleted_cnt == 0) { return rocksdb::Status::OK(); } **metadata.size -= *deleted_cnt; // if the size = 0, we just update the hash metadata** std::string bytes; metadata.Encode(&bytes); s = batch->Put(metadata_cf_handle_, ns_key, bytes); if (!s.ok()) return s; return storage_->Write(ctx, storage_->DefaultWriteOptions(), batch->GetWriteBatch()); }`` ### What did you expect to see? just like redis hash hdel ### What did you see instead? as hash is not a emptyableType `bool Metadata::IsSingleKVType() const { return Type() == kRedisString || Type() == kRedisJson; } bool Metadata::IsEmptyableType() const { return IsSingleKVType() || Type() == kRedisStream || Type() == kRedisBloomFilter || Type() == kRedisHyperLogLog || Type() == kRedisTDigest; }` ### Anything Else? _No response_ ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@kvrocks.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org