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

Riak KV (w/LevelDB backend) running as a single node does not persist data [JIRA: RIAK-2416] #1356

Open
jolson7168 opened this issue Feb 27, 2016 · 2 comments

Comments

@jolson7168
Copy link

RiakKV in a single node, non-clustered setup does not seem to persist data to disk using LevelDB as a backend.

Overview of test:

  1. Set up Riak KV as a single node using LevelDB as a backend
  2. Write a kv pair to node
  3. Stop and start riak using 'riak stop' and 'riak start'
  4. Try to retrieve the kv pair. Any KV pairs written in step Fix lru leak #2 will be gone.

Attached is the procedure I followed verbatim and was able to reproduce.

I do have the machine the test was performed on publicly available on EC2 if anyone wants to get in to inspect.

ProcedureToReproduce.txt

@Basho-JIRA Basho-JIRA changed the title Riak KV (w/LevelDB backend) running as a single node does not persist data Riak KV (w/LevelDB backend) running as a single node does not persist data [JIRA: RIAK-2416] Feb 27, 2016
@matthewvon
Copy link

Problem is within DB::Open(). This routine creates an internal DBImpl object, but continues to use original parameters past to the call. The DBImpl object contains the database name (database path) as corrected for tiered storage. DB:Open()'s use of the original database path is incorrect.

The problem is limited to the first recovery log, 0000xxxx.log, created upon database start/restart. All subsequent recovery logs get created using the proper tiered storage corrected path.

Result is that if database goes up and down before the initial recovery log is turned into a .sst table file, that log's data is lost. All subsequent recovery logs work properly during start/stop.

Fix is to adjust DB::Open() to use impl->dbname_ instead of dbname (parameter passed). Would be smart to switch all file operations after creation of DBImpl object to use impl->options_ instead of passed options parameter.

@matthewvon
Copy link

This PR was merged to "develop" branch of leveldb 2/29/16:

basho/leveldb#188

New release tags are pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants