Comments (13)
Found BitmapString also has this problem 😅 Let me take time to fix it
Oh, it's an expected behavior
from kvrocks.
if (start < 0 || stop <= 0 || start >= stop) return rocksdb::Status::OK();
The point maybe the condition above...
from kvrocks.
if (start < 0) start += static_cast<int64_t>(metadata.size) + 1;
if (stop < 0) stop += static_cast<int64_t>(metadata.size) + 1;
if (stop > static_cast<int64_t>(metadata.size)) stop = static_cast<int64_t>(metadata.size);
if (start < 0 || stop <= 0 || start >= stop) return rocksdb::Status::OK();
I think the code is confused, what is themetadata.size
means? the used bytes of bitmap,why should +1 ?
from kvrocks.
what is themetadata.sizemeans
Means the "extended" bit size. e.g.:
set bit 100 1
--> length = 100
set bit 99 1
--> length = 99
set bit 101 1
--> length = 101
the used bytes of bitmap,why should +1
You can edit it as you'd like 🤔
from kvrocks.
@mapleFU I do a test, it it not work like you said:
set bit 100 1
--> length = 100
but: length = 13 😄
from kvrocks.
Yeah, it's bytesize, should contain a mod 8
:
uint32_t byte_index = (offset / 8) % kBitmapSegmentBytes;
uint64_t used_size = index + byte_index + 1;
uint64_t bitmap_size = std::max(used_size, metadata.size);
from kvrocks.
Maybe this is the same reason with #1212 (comment)
from kvrocks.
@kay011 would you like fixing this? If not I'll do a quick fixing
from kvrocks.
@kay011 would you like fixing this? If not I'll do a quick fixing
you can do it, I will merge your code in my other feature
from kvrocks.
I'm trying to fix it here: #2069
from kvrocks.
@mapleFU BITPOS command may be have the same problem, please check~
from kvrocks.
Sigh, I've checked and also fixed that
from kvrocks.
closed by #2069
from kvrocks.
Related Issues (20)
- Add SQL select query parser for RediSearch
- Add redis query parser for RediSearch
- lua script import error HOT 5
- Add support for `flags` parameter of `redis.register_function`
- set sync option to true for WriteOptions HOT 5
- Failed to start server: rename file encounter error: Resource busy HOT 3
- subkey column family name HOT 2
- add options for set compress level HOT 2
- Enhance the implementation of Random Sample Keys in kvrocks HOT 9
- kvrocks2redis test scripts fail HOT 6
- Go test in macos-14 (M1) runner failed
- PubSub with Lettuce not working as expected HOT 4
- PubSub publish behaves differently with Redis in cluster mode HOT 5
- pubsub bug
- Optimization of Lua Global Locks HOT 2
- can kvrocks have a winows sln to comiple in wondows server?
- Add option to disable incremental sync in kvrocks2redis
- Add support of the command READONLY & READWRITE HOT 4
- kvrocks2redis migrate kvrocks to kvrocks-cluster
- Add support of the command ASKING HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvrocks.