Skip to content

Commit 75085ab

Browse files
committed
Acquire Write Intent for base table only
1 parent 12c2e0f commit 75085ab

7 files changed

Lines changed: 17 additions & 8 deletions

File tree

concourse/scripts/build_tarball.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ copy_libraries() {
169169
libraries=$(ldd "$executable" | awk 'NF==4{print $(NF-1)}{}')
170170
mkdir -p "$path"
171171
for lib in $libraries; do
172-
rsync -avL --ignore-existing "$lib" "$path/"
172+
rsync -aL --ignore-existing "$lib" "$path/"
173173
libname=$(basename "$lib")
174174
# Align with nightly: ensure each copied library has rpath set to $ORIGIN
175175
if [ -f "${path}/${libname}" ]; then

concourse/scripts/build_tarball_open.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ copy_libraries() {
134134

135135
mkdir -p "$path"
136136
for lib in $libraries; do
137-
rsync -avL --ignore-existing "$lib" "$path/"
137+
rsync -aL --ignore-existing "$lib" "$path/"
138138
libname=$(basename "$lib")
139139
if [ -f "${path}/${libname}" ]; then
140140
patchelf --set-rpath '$ORIGIN' "${path}/${libname}"

src/mongo/db/modules/eloq/src/base/eloq_util.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Status TxErrorCodeToMongoStatus(txservice::TxErrorCode txErr) {
1212
if (MONGO_likely(txErr == txservice::TxErrorCode::NO_ERROR))
1313
return Status::OK();
1414

15-
log() << "eloq engine error report: " << txservice::TxErrorMessage(txErr);
15+
log() << "Eloq engine error report: " << txservice::TxErrorMessage(txErr);
1616

1717
ErrorCodes::Error err;
1818
switch (txErr) {
@@ -30,6 +30,9 @@ Status TxErrorCodeToMongoStatus(txservice::TxErrorCode txErr) {
3030
err = ErrorCodes::CannotCreateIndex;
3131
break;
3232
case txservice::TxErrorCode::READ_WRITE_CONFLICT:
33+
// err = ErrorCodes::SnapshotUnavailable;
34+
err = ErrorCodes::ConflictingOperationInProgress;
35+
break;
3336
case txservice::TxErrorCode::WRITE_WRITE_CONFLICT:
3437
case txservice::TxErrorCode::OCC_BREAK_REPEATABLE_READ:
3538
case txservice::TxErrorCode::DEAD_LOCK_ABORT:
@@ -59,6 +62,9 @@ Status TxErrorCodeToMongoStatus(txservice::TxErrorCode txErr) {
5962
case txservice::TxErrorCode::UPSERT_TABLE_PREPARE_FAIL:
6063
err = ErrorCodes::OperationFailed;
6164
break;
65+
case txservice::TxErrorCode::REQUESTD_TABLE_NOT_EXISTS:
66+
err = ErrorCodes::NamespaceNotFound;
67+
break;
6268
default:
6369
err = ErrorCodes::UnknownError;
6470
break;

src/mongo/db/modules/eloq/src/eloq_index.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,16 @@ class EloqIndexCursor final : public SortedDataInterface::Cursor {
274274
}
275275
}
276276

277-
bool isForWrite = _opCtx->isUpsert();
277+
bool endInclusive = false;
278+
bool isForWrite = _opCtx->isUpsert() && _indexName->IsBase();
278279
// end_inclusive semantics has been handled by _endPosition
279280
_cursor->indexScanOpen(_indexName,
280281
_indexSchema->SchemaTs(),
281282
_scanType,
282283
&_startKey,
283284
startInclusive,
284285
&_endKey,
285-
false,
286+
endInclusive,
286287
direction,
287288
isForWrite);
288289

src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ void EloqKVEngine::initDataStoreService() {
644644
// "/home/lzx/test-eloqsql/eloq_ds.ini";
645645
INIReader fake_config_reader(nullptr, 0);
646646
EloqDS::RocksDBConfig rocksdb_config(fake_config_reader, _dbPath);
647+
rocksdb_config.query_worker_num_ = 10 * serverGlobalParams.reservedThreadNum;
647648
rocksdb_config.max_background_jobs_ = eloqGlobalOptions.rocksdbMaxBackgroundJobs;
648649
rocksdb_config.max_subcompactions_ = eloqGlobalOptions.rocksdbMaxSubCompactions;
649650

src/mongo/db/modules/eloq/src/eloq_record_store.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,14 +573,15 @@ class EloqRecordStoreCursor : public SeekableRecordCursor {
573573
_endKey = Eloq::MongoKey::GetNegInfTxKey();
574574
}
575575

576+
bool endInclusive = false;
576577
bool isForWrite = _opCtx->isUpsert();
577578
_cursor->indexScanOpen(_tableName,
578579
_keySchema->SchemaTs(),
579580
txservice::ScanIndexType::Primary,
580581
&_startKey,
581-
false,
582+
startInclusive,
582583
&_endKey,
583-
false,
584+
endInclusive,
584585
_forward ? txservice::ScanDirection::Forward
585586
: txservice::ScanDirection::Backward,
586587
isForWrite);

0 commit comments

Comments
 (0)