Package com.sleepycat.je.log

Examples of com.sleepycat.je.log.ReplicationContext


                    repNode.getVLSNFreezeLatch().awaitThaw();
                    repNode.getMasterStatus().assertSync();
                }

                repTxn.commit(syncPolicy,
                              new ReplicationContext(lastReplayedVLSN),
                              masterCommit.getMasterNodeId());

                Timestamp commitTime = masterCommit.getTime();
                lastReplayedTxn = new TxnInfo(lastReplayedVLSN,
                                              commitTime.getTime());

                /* Respond to the feeder. */
                long commitNanos = System.nanoTime() -
                    messageProcessingStartTime;
                updateCommitStats(needsAck, syncPolicy, commitNanos);

                if (commitNanos > ackTimeoutLogThresholdInNanos &&
                    logger.isLoggable(Level.INFO)) {
                    LoggerUtils.info
                        (logger, repImpl,
                         "Replay commit time: " + (commitNanos / 1000000) +
                         " ms exceeded log threshold: " +
                         (ackTimeoutLogThresholdInNanos / 1000000));
                }

                if (needsAck) {
                    protocol.write(protocol.new Ack(repTxn.getId()),
                                   namedChannel);
                }

                /*
                 * The group refresh and recalculation can be expensive, since
                 * it may require a database read. Do it after the ack.
                 */
                if (repTxn.getRepGroupDbChange() && canRefreshGroup(repTxn)) {
                    repNode.refreshCachedGroup();
                    repNode.recalculateGlobalCBVLSN();
                }

                nElapsedTxnTime.add(repTxn.elapsedTime());
            } else if (LogEntryType.LOG_TXN_ABORT.equalsType(entryType)) {

                nAborts.increment();
                TxnAbort masterAbort = (TxnAbort) logEntry.getMainItem();
                ReplicationContext abortContext =
                    new ReplicationContext(wireRecord.getVLSN());
                if (logger.isLoggable(Level.FINEST)) {
                    LoggerUtils.finest(logger, repImpl,
                                       "abort called for " + repTxn.getId() +
                                       " masterId=" +
                                       masterAbort.getMasterNodeId() +
View Full Code Here


         * for txns that take read locks, and a replicated txn consists only of
         * write operations.
         */
        final DatabaseImpl dbImpl = repImpl.getDbTree().getDb
            (dbId, -1, repImpl.getRepNode().getReplica().getDbCache());
        final ReplicationContext repContext =
            new ReplicationContext(wireRecord.getVLSN());
        final Cursor cursor = DbInternal.makeCursor(dbImpl, repTxn,
                                                    null /*cursorConfig*/);
        try {
            OperationStatus status;
            final LN ln = lnEntry.getLN();
View Full Code Here

                nameLN = replicatedLN;
            } else {
                nameLN = new NameLN(newId, envImpl, newDb.isReplicated());
            }

            ReplicationContext useRepContext = repContext;
            if (repContext == null) {
                useRepContext = newDb.getOperationRepContext(CREATE);
            }
            nameCursor.putLN(databaseName.getBytes("UTF-8"),// key
                             nameLN,
View Full Code Here

TOP

Related Classes of com.sleepycat.je.log.ReplicationContext

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.