Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-20465 *.mvccEnabled() removal #10945

Merged
merged 31 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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