mirror of https://github.com/mongodb/mongo
SERVER-114016 Temporarily disable WouldChangeOwningShard tests on master when UWE is enabled (#44223)
GitOrigin-RevId: 52bf3a2f9eda34eec294bfa2c8648603da2a1540
This commit is contained in:
parent
d074bcb2cd
commit
4b2623e0a4
|
|
@ -15,6 +15,7 @@
|
|||
import {extendWorkload} from "jstests/concurrency/fsm_libs/extend_workload.js";
|
||||
import {randomManualMigration} from "jstests/concurrency/fsm_workload_modifiers/random_manual_migrations.js";
|
||||
import {$config as $baseConfig} from "jstests/concurrency/fsm_workloads/updateOne_without_shard_key/write_without_shard_key_base.js";
|
||||
import {isUweEnabled} from "jstests/libs/query/uwe_utils.js";
|
||||
|
||||
const $partialConfig = extendWorkload($baseConfig, randomManualMigration);
|
||||
export const $config = extendWorkload($partialConfig, function ($config, $super) {
|
||||
|
|
@ -78,6 +79,14 @@ export const $config = extendWorkload($partialConfig, function ($config, $super)
|
|||
},
|
||||
};
|
||||
|
||||
// TODO SERVER-104122: Handle WCOS error in UWE.
|
||||
$config.setup = function (db, collName, cluster) {
|
||||
const uweEnabled = isUweEnabled(db);
|
||||
if (uweEnabled) {
|
||||
quit();
|
||||
}
|
||||
};
|
||||
|
||||
// Because updates don't have a shard filter stage, a migration may fail if a
|
||||
// broadcast update is operating on orphans from a previous migration in the range being
|
||||
// migrated back in. The particular error code is replaced with a more generic one, so this is
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {ShardingTest} from "jstests/libs/shardingtest.js";
|
|||
import {extractUUIDFromObject} from "jstests/libs/uuid_util.js";
|
||||
import {AnalyzeShardKeyUtil} from "jstests/sharding/analyze_shard_key/libs/analyze_shard_key_util.js";
|
||||
import {QuerySamplingUtil} from "jstests/sharding/analyze_shard_key/libs/query_sampling_util.js";
|
||||
import {isUweEnabled} from "jstests/libs/query/uwe_utils.js";
|
||||
|
||||
// This command involves running commands outside a session.
|
||||
TestData.disableImplicitSessions = true;
|
||||
|
|
@ -39,6 +40,16 @@ const st = new ShardingTest({
|
|||
mongosOptions: {setParameter: {queryAnalysisSamplerConfigurationRefreshSecs}},
|
||||
});
|
||||
|
||||
// TODO SERVER-104122: Enable when 'WouldChangeOwningShard' writes are supported.
|
||||
let uweEnabled = false;
|
||||
st.forEachConnection((conn) => {
|
||||
uweEnabled = uweEnabled || isUweEnabled(conn);
|
||||
});
|
||||
if (uweEnabled) {
|
||||
st.stop();
|
||||
quit();
|
||||
}
|
||||
|
||||
const execCtxTypes = {
|
||||
kNoClientSession: 1,
|
||||
kClientSessionNotRetryableWrite: 2,
|
||||
|
|
|
|||
|
|
@ -6,12 +6,23 @@
|
|||
*/
|
||||
|
||||
import {ShardingTest} from "jstests/libs/shardingtest.js";
|
||||
import {isUweEnabled} from "jstests/libs/query/uwe_utils.js";
|
||||
|
||||
const st = new ShardingTest({
|
||||
mongos: 1,
|
||||
shards: {rs0: {nodes: 1}, rs1: {nodes: 1}},
|
||||
});
|
||||
|
||||
// TODO SERVER-104122: Enable when 'WouldChangeOwningShard' writes are supported.
|
||||
let uweEnabled = false;
|
||||
st.forEachConnection((conn) => {
|
||||
uweEnabled = uweEnabled || isUweEnabled(conn);
|
||||
});
|
||||
if (uweEnabled) {
|
||||
st.stop();
|
||||
quit();
|
||||
}
|
||||
|
||||
const coll = st.s.getDB("test").getCollection(jsTestName());
|
||||
|
||||
const badDoc = {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
* ]
|
||||
*/
|
||||
import {ReshardingTest} from "jstests/sharding/libs/resharding_test_fixture.js";
|
||||
import {isUweEnabled} from "jstests/libs/query/uwe_utils.js";
|
||||
|
||||
function runTest(reshardInPlace) {
|
||||
const reshardingTest = new ReshardingTest({numDonors: 2, numRecipients: 1, reshardInPlace});
|
||||
|
|
@ -39,6 +40,16 @@ function runTest(reshardInPlace) {
|
|||
const mongosConn = mongosTestColl.getMongo();
|
||||
const mongosTestDB = mongosConn.getDB(dbName);
|
||||
|
||||
// TODO SERVER-104122: Enable when 'WouldChangeOwningShard' writes are supported.
|
||||
let uweEnabled = false;
|
||||
reshardingTest._st.forEachConnection((conn) => {
|
||||
uweEnabled = uweEnabled || isUweEnabled(conn);
|
||||
});
|
||||
if (uweEnabled) {
|
||||
reshardingTest.teardown();
|
||||
quit();
|
||||
}
|
||||
|
||||
// Test commands that the shard key of a document in the test collection from change its shard
|
||||
// key. Note we don't test the remove:true case because the document can't move shards if it is
|
||||
// being deleted.
|
||||
|
|
|
|||
Loading…
Reference in New Issue