Skip to content

Commit

Permalink
Review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
devozerov committed Aug 31, 2018
1 parent 55c579e commit 94edc00
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,8 @@ protected Object readResolve() throws ObjectStreamException {
/**
* Make counters accumulated during transaction visible outside of transaciton.
*/
// TODO: Why everything is concurrent? If only one thread changes, then use volatile.
// TODO: If already protected, then remove concurrent collections.
protected void applyTxCounters() {
Map<Integer, ? extends Map<Integer, AtomicLong>> sizeDeltas = txCounters.sizeDeltas();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ protected final void onTxEnd(GridCacheContext cacheCtx, IgniteInternalTx tx, boo

/** {@inheritDoc} */
@Override public void touchPartition(int cacheId, int partId) {
// TODO: Race? Or remove concurrent collections.
if (touchedParts == null)
touchedParts = new ConcurrentHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/**
* Values which should be tracked during transaction execution and applied on commit.
*/
// TODO: Can we remove "touched" and use counter (cache->part) mappings?
public class TxCounters {
/** Size changes for cache partitions made by transaction */
private final ConcurrentMap<Integer, ConcurrentMap<Integer, AtomicLong>> sizeDeltas = new ConcurrentHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
/**
*
*/
// TODO: Minimize cache restarts
// TODO: No tests for UPDATE
// TODO: Tests for updates on the same key? INSERT/DELETE/INSERT, etc.
// TODO: Merge operation tests
// TODO: Write conflict test
// TODO: Concurrent tests
// TODO: Tests for cache API: failing tests or separate ticket

public class CacheMvccSizeTest extends CacheMvccAbstractTest {
/** {@inheritDoc} */
@Override protected CacheMode cacheMode() {
Expand Down

0 comments on commit 94edc00

Please sign in to comment.