~pbeaman/akiban-persistit/fix-hard-commit-infinite-loop

« back to all changes in this revision

Viewing changes to src/main/java/com/persistit/TransactionIndex.java

merge pbeaman: Fixes bug 1032701 - Interrupt causes Thread to exit without releasing claims.

https://code.launchpad.net/~pbeaman/akiban-persistit/fix-1032701-interrupts-leave-latches/+merge/118253

Show diffs side-by-side

added added

removed removed

Lines of Context:
1073
1073
                    }
1074
1074
                    bucket.checkpointAccumulatorSnapshots(timestamp);
1075
1075
                    for (final Accumulator accumulator : accumulators) {
1076
 
                        accumulator.setCheckpointValueAndTimestamp(accumulator.applyValue(accumulator
1077
 
                                .getCheckpointValue(), accumulator.getCheckpointTemp()), timestamp);
 
1076
                        accumulator.setCheckpointValueAndTimestamp(
 
1077
                                accumulator.applyValue(accumulator.getCheckpointValue(),
 
1078
                                        accumulator.getCheckpointTemp()), timestamp);
1078
1079
                    }
1079
1080
                } catch (RetryException e) {
1080
1081
                    again = true;
1086
1087
    }
1087
1088
 
1088
1089
    /**
1089
 
     * Create and return a brand new delta associated with the given
1090
 
     * status. Note that it is completely uninitialized and always
1091
 
     * allocated from the bucket.
1092
 
     *
1093
 
     * @param status Status to add the delta to.
 
1090
     * Create and return a brand new delta associated with the given status.
 
1091
     * Note that it is completely uninitialized and always allocated from the
 
1092
     * bucket.
 
1093
     * 
 
1094
     * @param status
 
1095
     *            Status to add the delta to.
1094
1096
     * @return The new Delta.
1095
1097
     */
1096
1098
    Delta addDelta(final TransactionStatus status) {
1107
1109
    }
1108
1110
 
1109
1111
    /**
1110
 
     * Create, or combine, new delta information for the given status.
1111
 
     * This method attempts to find a compatible delta
1112
 
     * (see {@link Delta#canMerge(Accumulator, int)}) to combine with
1113
 
     * before allocating a new one. If one is not found,
1114
 
     * {@link #addDelta(TransactionStatus)} is called and initialized
1115
 
     * before returning.
1116
 
     *
1117
 
     * @param status Status to add, or combine, delta to.
1118
 
     * @param accumulator Accumulator being modified.
1119
 
     * @param step Step value of modification.
1120
 
     * @param value The value to add or combine.
1121
 
     *
 
1112
     * Create, or combine, new delta information for the given status. This
 
1113
     * method attempts to find a compatible delta (see
 
1114
     * {@link Delta#canMerge(Accumulator, int)}) to combine with before
 
1115
     * allocating a new one. If one is not found,
 
1116
     * {@link #addDelta(TransactionStatus)} is called and initialized before
 
1117
     * returning.
 
1118
     * 
 
1119
     * @param status
 
1120
     *            Status to add, or combine, delta to.
 
1121
     * @param accumulator
 
1122
     *            Accumulator being modified.
 
1123
     * @param step
 
1124
     *            Step value of modification.
 
1125
     * @param value
 
1126
     *            The value to add or combine.
 
1127
     * 
1122
1128
     * @return Delta that was created or modified.
1123
1129
     */
1124
1130
    Delta addOrCombineDelta(TransactionStatus status, Accumulator accumulator, int step, long value) {