Coder Social home page Coder Social logo

Comments (1)

catbref avatar catbref commented on July 16, 2024

Working backwards from innermost stack frame:

mapdb/Volume.java:434

        public final DataInput2 getDataInput(long offset, int size) {
            return new DataInput2(chunks[(int)(offset >>> chunkShift)], (int) (offset&chunkSizeModMask));
        }

offset >>> chunkShift equates to 136, which is the non-existent array index in chunks.
chunkShift seems to be 20 so chunks are 1MB in size?

So the offset is wrong when passed at mapdb/StoreWAL.java:344:

            DataInput2 in = (DataInput2) log.getDataInput(r[0]&LOG_MASK_OFFSET, size);

r[0] comes from the modified transaction HashMap (lines 333-334):

        //check if record was modified in current transaction
        long[] r = modified.get(ioRecid);

Is modified somehow out of sync?

  • cleared in reloadIndexFile but this shouldn't cause the issue above where there is a record
  • set to PREALLOC in preallocate() but also shouldn't cause issue above
  • set in put() line 228
  • set in update() line 416
  • set in compareAndSwap() line 477
  • "tombstoned" in delete() line 528

Is the log ByteBufferVol corrupted/reset outside of a write-lock by another thread?

  • logReset() only checks for structuralLock
  • logReset() called by:
    • rollback() - under full write locks
    • replayLogFile() twice - called by commit() - under full write locks
    • StoreWAL constructor

Does this situation only occur on Windows and hence something to do with mmap/Windows caching?

Is it possible to store more than chunkSize in a chunk when ByteBufferVol should put extra bytes into next chunk? (Maybe add assert()s to mapdb/Volume.java to test this)

from qora.

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.