Package com.sleepycat.je.tree

Examples of com.sleepycat.je.tree.ChildReference


        }

        public IN doWork(ChildReference root)
            throws DatabaseException {

            ChildReference newRoot =
    tree.makeRootChildReference(inFromLog, new byte[0], lsn);
            inFromLog.releaseLatch();

            if (root == null) {
                tree.setRoot(newRoot, false);
View Full Code Here


            if (ln.containsDuplicates()) {
                /* Migrate a DupCountLN. */
                parentDIN = (DIN) bin.fetchTarget(index);
                parentDIN.latch(UPDATE_GENERATION);
                ChildReference dclRef = parentDIN.getDupCountLNRef();
                processedHere = false;
                migrateDupCountLN
                    (db, dclRef.getLsn(), parentDIN, dclRef,
                     true,           // wasCleaned
                     true,           // isPending
                     ln.getNodeId(), // lockedPendingNodeId
                     CLEAN_PENDING_LN);
            } else {
View Full Code Here

        }

        public IN doWork(ChildReference root)
            throws DatabaseException {

            ChildReference newRoot =
                tree.makeRootChildReference(inFromLog, new byte[0], lsn);
            inFromLog.releaseLatch();
            inFromLogIsLatched = false;

            if (root == null) {
View Full Code Here

        }

        /* Handle the DupCountLN for a DIN root. */
        if (isDINRoot) {
            DIN din = (DIN) in;
            ChildReference dupCountLNRef = din.getDupCountLNRef();
            long lsn = dupCountLNRef.getLsn();
            if (lsn == DbLsn.NULL_LSN) {
                DupCountLN dcl = din.getDupCountLN();
                callback.processDupCount(dcl.getDupCount());
            } else {
                /* Negative index signifies a DupCountLN. */
                addToLsnINMap(Long.valueOf(lsn), in, -1);
                Node node = fetchLSNHandleExceptions(lsn, lnKeyEntry);
                if (node != null) {
                    callProcessLSNHandleExceptions
                        (lsn, LogEntryType.LOG_DUPCOUNTLN, node,
                         dupCountLNRef.getKey());
                }
            }
        }
    }
View Full Code Here

             */
            parent = db.getTree().searchSplitsAllowed
                (mainTreeKey, -1, CacheMode.DEFAULT);
            assert parent instanceof BIN;

            ChildReference newRef =
                new ChildReference(inFromLog, mainTreeKey, lsn);
            index = parent.insertEntry1(newRef);
            if ((index >= 0 &&
                 (index & IN.EXACT_MATCH) != 0)) {

                index &= ~IN.EXACT_MATCH;
View Full Code Here

         *
         * Also, the LN must be left null to ensure the key in the BIN slot is
         * transactionally correct (keys are updated if necessary when the LN
         * is fetched)[#15704]
         */
        ChildReference newLNRef =
            new ChildReference(null, location.lnKey, logLsn);

        BIN parentBIN = location.bin;
        int entryIndex = parentBIN.insertEntry1(newLNRef);

        if ((entryIndex & IN.INSERT_SUCCESS) == 0) {
View Full Code Here

            boolean isDupCountLN = ln.containsDuplicates();
            long treeLsn;
            if (isDupCountLN) {
                parentDIN = (DIN) bin.fetchTarget(index);
                parentDIN.latch(Cleaner.UPDATE_GENERATION);
                ChildReference dclRef = parentDIN.getDupCountLNRef();
                treeLsn = dclRef.getLsn();
            } else {
                treeLsn = bin.getLsn(index);
            }

            /* Process this LN that was found in the tree. */
 
View Full Code Here

                 * the BIN or IN parent dirty. Otherwise, when the BIN or IN is
                 * evicted in the future, it will be written to disk without
                 * flushing its dirty, migrated LNs.  [#18227]
                 */
                if (isDupCountLN) {
                    ChildReference dclRef = parentDIN.getDupCountLNRef();
                    if (dclRef.getTarget() == null) {
                        lnFromLog.postFetchInit(db, logLsn);
                        parentDIN.updateDupCountLN(lnFromLog);
                    }

                    if (isTemporary) {
                        ((LN) dclRef.getTarget()).setDirty();
                        dclRef.setLsn(DbLsn.NULL_LSN);
                        parentDIN.setDirty(true);
                    } else if (cleaner.lazyMigration) {
                        dclRef.setMigrate(true);
                        parentDIN.setDirty(true);
                    } else {
                        LN targetLn = (LN) dclRef.getTarget();
                        assert targetLn != null;
                        byte[] targetKey = parentDIN.getDupKey();
                        long newLNLsn = targetLn.log
                            (env, db, targetKey, logLsn, locker,
                             true /*backgroundIO*/,
 
View Full Code Here

            if (ln.containsDuplicates()) {
                /* Migrate a DupCountLN. */
                parentDIN = (DIN) bin.fetchTarget(index);
                parentDIN.latch(UPDATE_GENERATION);
                ChildReference dclRef = parentDIN.getDupCountLNRef();
                processedHere = false;
                migrateDupCountLN
                    (db, dclRef.getLsn(), parentDIN, dclRef,
                     true,           // wasCleaned
                     true,           // isPending
                     ln.getNodeId(), // lockedPendingNodeId
                     CLEAN_PENDING_LN);
            } else {
View Full Code Here

            parent = db.getTree().search
                (mainTreeKey, Tree.SearchType.NORMAL, -1, null,
                 true /*updateGeneration*/);
            assert parent instanceof BIN;

      ChildReference newRef =
    new ChildReference(inFromLog, mainTreeKey, lsn);
      index = parent.insertEntry1(newRef);
      if ((index >= 0 &&
     (index & IN.EXACT_MATCH) != 0)) {

    index &= ~IN.EXACT_MATCH;
View Full Code Here

TOP

Related Classes of com.sleepycat.je.tree.ChildReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.