stardog-union / rocksdb

GNU General Public License v2.0
4 stars 1 forks source link

Port Facebook PR8370 to Stardog: GetFreeSpace wrong if not root #28

Closed matthewvon closed 3 years ago

matthewvon commented 3 years ago

fs_posix.cc GetFreeSpace() calculates free space based upon a call to statvfs(). However, there are two extremely different values in statvfs's returned structure: f_bfree which is free space for root and f_bavail which is free space for non-root users. The existing code uses f_bfree. Many disks have 5 to 10% of the total disk space reserved for root only. Therefore GetFreeSpace() does not realize that non-root users may not have storage available.

This PR detects whether the effective posix user is root or not, then selects the appropriate available space value.

https://github.com/facebook/rocksdb/pull/8370

matthewvon commented 3 years ago

@paulplace Please ignore the "All checks have failed". We are somehow requesting a private docker container per a config of Facebook's that I have not yet found / disabled. This is new.

paulplace commented 3 years ago

@matthewvon What is the reason for deleting the .circleci files? Were they mistakenly committed?

matthewvon commented 3 years ago

We seem to have gotten them for free from Facebook. Much like an STD. I was attempting to kill off these new CircleCI tests ... no luck. I can put them back or worry about it another day. Your call.

paulplace commented 3 years ago

Since we do not use them, I see no reason to put them back.

matthewvon commented 3 years ago

done