Skip to content

Commit

Permalink
IGNITE-20465 *.mvccEnabled() removal (#10945)
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-vinogradov authored Sep 25, 2023
1 parent bb91c57 commit a688b1d
Show file tree
Hide file tree
Showing 34 changed files with 46 additions and 869 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
import static java.sql.Statement.RETURN_GENERATED_KEYS;
import static org.apache.ignite.cache.query.SqlFieldsQuery.DFLT_LAZY;
import static org.apache.ignite.configuration.ClientConnectorConfiguration.DFLT_PORT;
import static org.apache.ignite.internal.processors.odbc.SqlStateCode.TRANSACTION_STATE_EXCEPTION;
import static org.apache.ignite.testframework.GridTestUtils.assertThrows;
import static org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause;
import static org.apache.ignite.testframework.GridTestUtils.getFieldValue;
Expand Down Expand Up @@ -1290,50 +1289,6 @@ public void testRollback() throws Exception {
}
}

/**
* @throws Exception if failed.
*/
@Test
public void testBeginFails() throws Exception {
try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn.createStatement().execute("BEGIN");

fail("Exception is expected");
}
catch (SQLException e) {
assertEquals(TRANSACTION_STATE_EXCEPTION, e.getSQLState());
}
}

/**
* @throws Exception if failed.
*/
@Test
public void testCommitIgnored() throws Exception {
try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn.setAutoCommit(false);
conn.createStatement().execute("COMMIT");

conn.commit();
}
// assert no exception
}

/**
* @throws Exception if failed.
*/
@Test
public void testRollbackIgnored() throws Exception {
try (Connection conn = DriverManager.getConnection(urlWithPartitionAwarenessProp)) {
conn.setAutoCommit(false);

conn.createStatement().execute("ROLLBACK");

conn.rollback();
}
// assert no exception
}

/**
* @throws Exception If failed.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public InlineIndexTree(

this.idxRowCache = idxRowCache;

mvccEnabled = grpCtx.mvccEnabled();
mvccEnabled = false;

if (!initNew) {
// Init from metastore.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,6 @@ public CacheGroupContext(
topValidators = Collections.unmodifiableCollection(topologyValidators(ccfg, ctx.kernalContext().plugins()));
}

/**
* @return Mvcc flag.
*/
public boolean mvccEnabled() {
return mvccEnabled;
}

/**
* @return {@code True} if this is cache group for one of system caches.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import org.apache.ignite.internal.util.lang.GridIterator;
import org.apache.ignite.internal.util.lang.IgniteInClosure2X;
import org.apache.ignite.internal.util.lang.IgnitePredicateX;
import org.apache.ignite.lang.IgniteBiTuple;
import org.jetbrains.annotations.Nullable;

/**
Expand Down Expand Up @@ -198,17 +197,6 @@ public void invoke(GridCacheContext cctx, KeyCacheObject key, GridDhtLocalPartit
@Nullable public CacheDataRow mvccRead(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot mvccSnapshot)
throws IgniteCheckedException;

/**
* For testing only.
*
* @param cctx Cache context.
* @param key Key.
* @return All stored versions for given key.
* @throws IgniteCheckedException If failed.
*/
public List<IgniteBiTuple<Object, MvccVersion>> mvccAllVersions(GridCacheContext cctx, KeyCacheObject key)
throws IgniteCheckedException;

/**
* Returns iterator over the all row versions for the given key.
*
Expand Down Expand Up @@ -983,17 +971,6 @@ GridCursor<CacheDataRow> mvccAllVersionsCursor(GridCacheContext cctx, KeyCacheOb
public CacheDataRow mvccFind(GridCacheContext cctx, KeyCacheObject key, MvccSnapshot snapshot)
throws IgniteCheckedException;

/**
* For testing only.
*
* @param cctx Cache context.
* @param key Key.
* @return All stored versions for given key.
* @throws IgniteCheckedException If failed.
*/
List<IgniteBiTuple<Object, MvccVersion>> mvccFindAllVersions(GridCacheContext cctx, KeyCacheObject key)
throws IgniteCheckedException;

/**
* @return Data cursor.
* @throws IgniteCheckedException If failed.
Expand Down
Loading

0 comments on commit a688b1d

Please sign in to comment.