feat: support limit WriteBatch size
relate to https://github.com/apache/kvrocks/issues/2284
Added the ability to limit the size of WriteBatch operations in RocksDB to control memory usage effectively.
@AntiTopQuark Thanks for your efforts. Would you mind adding a Go test case for this?
@AntiTopQuark Thanks for your efforts. Would you mind adding a Go test case for this?
Sure, I will complete this task later.
While adding cases, it was found that there were no corresponding error messages, so error codes were added and reported in many places involving batch processing
While adding cases, it was found that there were no corresponding error messages, so error codes were added and reported in many places involving batch processing
Yes, that makes sense.
@AntiTopQuark One comment inline, rest are good to me. Could anyone also have a look at this PR? @PragmaTwice @torwig @caipengbo @mapleFU
Quality Gate passed
Issues
42 New issues
0 Accepted issues
Measures
0 Security Hotspots
56.7% Coverage on New Code
4.4% Duplication on New Code
Also cc @PragmaTwice
Do we need some macro like
RETURN_NOT_OK,RETURN_NOT_OK_FROM_ROCKSDB?
@mapleFU @AntiTopQuark RETURN_IF_ERR is also good for this?
I think it's good. Another problem is that we may need type cast between Status and rocksdb::Status. We can make a new issue here.
Yes, let's discuss this in new issue.
Also cc @PragmaTwice
Do we need some macro like
RETURN_NOT_OK,RETURN_NOT_OK_FROM_ROCKSDB?
Nope. They can be done by GET_OR_RET.
Nope. They can be done by GET_OR_RET.
So GET_OR_RET can also handle the case for pure "Status"?
Besides, what about err from rocksdb?