GithubHelp home page GithubHelp logo

Comments (6)

alanpaxton avatar alanpaxton commented on April 28, 2024

Is the manifest really corrupted, or are you just hitting a compatibility issue ? I am not sure how compatible RocksDB and LevelDB formats are; you could try opening using RocksJava with the oldest RocksDB format version

  public void openWithOldestFormatVersion() {
    final BlockBasedTableConfig blockBasedTableConfig =
        new BlockBasedTableConfig().setFormatVersion(0);

    try (final Options options = new Options().setTableFormatConfig(blockBasedTableConfig);
         final RocksDB ignored = RocksDB.openReadOnly(options, "<Your DB path here>")) {
    } catch (RocksDBException e) {
      // Access the DB
    }
  }

If you want to dig deeper see Docs

If the above doesn't work, you may be able to migrate your DB by opening it using LevelDB, iterating the keys and values, and writing to a new RocksDB database.

from rocksdb.

dasasd122311 avatar dasasd122311 commented on April 28, 2024

Действительно ли манифест поврежден, или у вас просто возникла проблема совместимости? Я не уверен, насколько совместимы форматы RocksDB и LevelDB; вы можете попробовать открыть с помощью RocksJava самую старую версию формата RocksDB.

  public void openWithOldestFormatVersion() {
    final BlockBasedTableConfig blockBasedTableConfig =
        new BlockBasedTableConfig().setFormatVersion(0);

    try (final Options options = new Options().setTableFormatConfig(blockBasedTableConfig);
         final RocksDB ignored = RocksDB.openReadOnly(options, "<Your DB path here>")) {
    } catch (RocksDBException e) {
      // Access the DB
    }
  }

Если вы хотите копнуть глубже, см. Документы .

Если вышеперечисленное не сработает, вы можете перенести свою БД, открыв ее с помощью LevelDB, повторив ключи и значения и записав в новую базу данных RocksDB.

I think the problem is really due to LevelDB and RocksDB incompatibility, but setting it to the old database format didn't solve the problem. My LevelDB databases have been around since 2022

from rocksdb.

alanpaxton avatar alanpaxton commented on April 28, 2024

It was worth a try. I agree, it is probably just basic divergence/incompatibility. I guess you will need to write copy code in C++, as there isn't a Java API for LevelDB. Unless someone has a better idea, are you happy to close this ticket ?

from rocksdb.

dasasd122311 avatar dasasd122311 commented on April 28, 2024

Yeah, I'm closing the issue

from rocksdb.

adamretter avatar adamretter commented on April 28, 2024

@dasasd122311 There was a Java port of LevelDB (I haven't checked if the storage format is the same) - might be helpful for you - https://github.com/dain/leveldb

from rocksdb.

dasasd122311 avatar dasasd122311 commented on April 28, 2024

@dasasd122311 There was a Java port of LevelDB (I haven't checked if the storage format is the same) - might be helpful for you - https://github.com/dain/leveldb

I use its fork - https://github.com/halibobor/leveldb-java. Because the fork has been updated and has no problem reading ldb files. But the code is using org.iq80.snappy library. I got the error EXCEPTION_ACCESS_VIOLATION. I read that the owner of this library wrote that they switched to the new aircompressor library, but I don't know how I can rewrite the LevelDB library code, because some methods are used, some are removed and so on. I thought switching to RocksDB would solve my problem because it is updated frequently, but RocksDB is incompatible with my database.

from rocksdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.