Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent behaviour with GetApproximateSizes ? #4644

Closed
benoitc opened this issue Nov 6, 2018 · 3 comments
Closed

inconsistent behaviour with GetApproximateSizes ? #4644

benoitc opened this issue Nov 6, 2018 · 3 comments

Comments

@benoitc
Copy link
Contributor

benoitc commented Nov 6, 2018

GetApproximateSizes can return from time to time "0", when expected size is > 6000 bytes for 1 range when including both files and memtables. I'm passing to the function an array of ranges:

 uint64_t sizes[num_ranges];
 db_ptr->m_Db->GetApproximateSizes(column_family, ranges, num_ranges, sizes, flag);

where ranges have been initialised like this:

rocksdb::Range *ranges = new rocksdb::Range[num_ranges];
    while (...)
    {
      ...
            ranges[j].start = start;
            ranges[j].limit = limit;
            j++;
       ...
    }

Full code : https://gitlab.com/barrel-db/erlang-rocksdb/blob/master/c_src/erocksdb_db.cc#L1301-1381

The test is doing similar to the one in db_test.cc . Is this expected?

@benoitc
Copy link
Contributor Author

benoitc commented Nov 9, 2018

Current theory is that the data has been written in SST files. But then i'm confused about what means include_files there. Shouldn't it return also the size?

The unit test is actually a port of the ApproximateSizesMemTable test in db_tests.cc in erlang. I am not sure what I'm missing.

Full ticket related : https://gitlab.com/barrel-db/erlang-rocksdb/issues/72

@benoitc
Copy link
Contributor Author

benoitc commented Nov 13, 2018

is there anything i should check? This error comes often dring our unit tests, and it's not good to restart them to fix it...

@benoitc
Copy link
Contributor Author

benoitc commented Nov 18, 2018

closing issue as it's not enough described IMO. I will reopen a more descriptive one.

@benoitc benoitc closed this as completed Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant