sdb fails to sync from mem to file

Open
#140 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c
Domain
database

Research direction

Start by reproducing the mem-to-file sync failure in the sdb API, focusing on the sdb_merge and sdb_sync calls shown in the workaround for the zos command. Compare the direct sync path with the workaround and consider the issue done when syncing from memory to a file works without that workaround.

Written by the indexing model from the issue text.

Description

During the implementation of the command zos in r2 (save zigns), it's been found that syncing from mem to file was buggy. Current workaround:

    Sdb *db = sdb_new (NULL, file, 0);
    if (!db) {
        return false;
    }
    sdb_merge (db, a->sdb_zigns);
    retval = sdb_sync (db);
    sdb_close (db);
    sdb_free (db);
Dominant language
C
Stars
235
Forks
69
Avg merge
1m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from radareorg/sdb

All issues in radareorg/sdb

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.