Package com.persistit.exception

Examples of com.persistit.exception.CorruptValueException


                final long tc = ti.commitStatus(versionHandle, UNCOMMITTED, 0);
                if (tc >= 0) {
                    if (tc == UNCOMMITTED) {
                        final long ts = vh2ts(versionHandle);
                        if (uncommittedTransactionTs != 0 && uncommittedTransactionTs != ts) {
                            throw new CorruptValueException("Multiple uncommitted versions");
                        }
                        uncommittedTransactionTs = ts;
                        mark(bytes, from);
                        marked++;
                        /*
                         * Mark the last committed version too because the
                         * transaction for the current version may abort
                         */
                        if (lastVersionIndex != -1) {
                            mark(bytes, lastVersionIndex);
                            marked++;
                            lastVersionIndex = -1;
                        }
                        primordial = false;
                    } else {
                        if (lastVersionIndex != -1 && ti.hasConcurrentTransaction(lastVersionTc, tc)) {
                            mark(bytes, lastVersionIndex);
                            marked++;
                            primordial = false;
                        }
                        // Note: versions and tcs can be the same when there are
                        // multiple steps
                        assert versionHandle >= lastVersionHandle || vh2ts(versionHandle) == vh2ts(lastVersionHandle);
                        assert tc >= lastVersionTc || lastVersionTc == UNCOMMITTED;
                        lastVersionIndex = from;
                        lastVersionHandle = versionHandle;
                        lastVersionTc = tc;
                    }
                }
                from += vlength + LENGTH_PER_VERSION;
                if (from > offset + length) {
                    throw new CorruptValueException("MVV Value is corrupt at index: " + from);
                }
            }
            if (lastVersionIndex != -1) {
                mark(bytes, lastVersionIndex);
                marked++;
View Full Code Here


                offset += LENGTH_PER_VERSION;
                visitor.sawVersion(version, offset, valueLength);
                offset += valueLength;
            }
            if (offset != sourceOffset + sourceLength) {
                throw new CorruptValueException("invalid length in MVV at offset/length=" + sourceOffset + "/"
                        + sourceLength);
            }
        }
    }
View Full Code Here

                final long tc = ti.commitStatus(versionHandle, UNCOMMITTED, 0);
                if (tc >= 0) {
                    if (tc == UNCOMMITTED) {
                        final long ts = vh2ts(versionHandle);
                        if (uncommittedTransactionTs != 0 && uncommittedTransactionTs != ts) {
                            throw new CorruptValueException("Multiple uncommitted version");
                        }
                        uncommittedTransactionTs = ts;
                        mark(bytes, from);
                        marked++;
                        /*
                         * Mark the last committed version too because the
                         * transaction for the current version may abort
                         */
                        if (lastVersionIndex != -1) {
                            mark(bytes, lastVersionIndex);
                            marked++;
                            lastVersionIndex = -1;
                        }
                        primordial = false;
                    } else {
                        if (lastVersionIndex != -1 && ti.hasConcurrentTransaction(lastVersionTc, tc)) {
                            mark(bytes, lastVersionIndex);
                            marked++;
                            primordial = false;
                        }
                        // Note: versions and tcs can be the same when there are
                        // multiple steps
                        assert versionHandle >= lastVersionHandle || vh2ts(versionHandle) == vh2ts(lastVersionHandle);
                        assert tc >= lastVersionTc || lastVersionTc == UNCOMMITTED;
                        lastVersionIndex = from;
                        lastVersionHandle = versionHandle;
                        lastVersionTc = tc;
                    }
                }
                from += vlength + LENGTH_PER_VERSION;
                if (from > offset + length) {
                    throw new CorruptValueException("MVV Value is corrupt at index: " + from);
                }
            }
            if (lastVersionIndex != -1) {
                mark(bytes, lastVersionIndex);
                marked++;
View Full Code Here

                offset += LENGTH_PER_VERSION;
                visitor.sawVersion(version, offset, valueLength);
                offset += valueLength;
            }
            if (offset != sourceOffset + sourceLength) {
                throw new CorruptValueException("invalid length in MVV at offset/length=" + sourceOffset + "/"
                        + sourceLength);
            }
        }
    }
View Full Code Here

                final long tc = ti.commitStatus(versionHandle, UNCOMMITTED, 0);
                if (tc >= 0) {
                    if (tc == UNCOMMITTED) {
                        final long ts = vh2ts(versionHandle);
                        if (uncommittedTransactionTs != 0 && uncommittedTransactionTs != ts) {
                            throw new CorruptValueException("Multiple uncommitted version");
                        }
                        uncommittedTransactionTs = ts;
                        mark(bytes, from);
                        marked++;
                        /*
                         * Mark the last committed version too because the
                         * transaction for the current version may abort
                         */
                        if (lastVersionIndex != -1) {
                            mark(bytes, lastVersionIndex);
                            marked++;
                            lastVersionIndex = -1;
                        }
                        primordial = false;
                    } else {
                        if (lastVersionIndex != -1 && ti.hasConcurrentTransaction(lastVersionTc, tc)) {
                            mark(bytes, lastVersionIndex);
                            marked++;
                            primordial = false;
                        }
                        // Note: versions and tcs can be the same when there are
                        // multiple steps
                        assert versionHandle >= lastVersionHandle || vh2ts(versionHandle) == vh2ts(lastVersionHandle);
                        assert tc >= lastVersionTc || lastVersionTc == UNCOMMITTED;
                        lastVersionIndex = from;
                        lastVersionHandle = versionHandle;
                        lastVersionTc = tc;
                    }
                }
                from += vlength + LENGTH_PER_VERSION;
                if (from > offset + length) {
                    throw new CorruptValueException("MVV Value is corrupt at index: " + from);
                }
            }
            if (lastVersionIndex != -1) {
                mark(bytes, lastVersionIndex);
                marked++;
View Full Code Here

                offset += LENGTH_PER_VERSION;
                visitor.sawVersion(version, offset, valueLength);
                offset += valueLength;
            }
            if (offset != sourceOffset + sourceLength) {
                throw new CorruptValueException("invalid length in MVV at offset/length=" + sourceOffset + "/"
                        + sourceLength);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.persistit.exception.CorruptValueException

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.