Skip to content

Commit 93fb563

Browse files
committed
Fix build andcorrect dept
1 parent ac2677f commit 93fb563

20 files changed

+34
-487
lines changed

ydb/core/kqp/ut/opt/kqp_ne_ut.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <ydb/public/sdk/cpp/client/ydb_proto/accessor.h>
44
#include <ydb/core/kqp/runtime/kqp_read_actor.h>
5+
#include <ydb/core/tx/datashard/datashard_impl.h>
56

67
namespace NKikimr::NKqp {
78

ydb/core/kqp/ut/scan/kqp_scan_ut.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <ydb/core/kqp/ut/common/kqp_ut_common.h>
22
#include <ydb/core/kqp/counters/kqp_counters.h>
33
#include <ydb/core/tx/datashard/datashard_failpoints.h>
4+
#include <ydb/core/tx/datashard/datashard_impl.h>
45
#include <ydb/core/tx/scheme_cache/scheme_cache.h>
56

67
#include <ydb/library/yql/dq/actors/compute/dq_compute_actor.h>

ydb/core/kqp/ut/scan/kqp_split_ut.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <ydb/core/kqp/ut/common/kqp_ut_common.h>
22
#include <ydb/core/kqp/counters/kqp_counters.h>
33
#include <ydb/core/tx/scheme_cache/scheme_cache.h>
4+
#include <ydb/core/tx/datashard/datashard_impl.h>
45

56
#include <ydb/core/base/tablet_pipecache.h>
67
#include <ydb/core/kqp/runtime/kqp_read_actor.h>

ydb/core/tx/columnshard/columnshard_impl.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include <ydb/core/tx/locks/locks.h>
2929
#include <ydb/services/metadata/service.h>
3030

31-
#include <ydb/core/tx/datashard/datashard_user_table.h>
32-
3331
namespace NKikimr::NOlap {
3432
class TCleanupColumnEngineChanges;
3533
class TTTLColumnEngineChanges;
@@ -227,7 +225,7 @@ class TColumnShard
227225
TabletCounters->Simple()[counter].Add(num);
228226
}
229227

230-
// For systable
228+
// For syslocks
231229
void IncCounter(NDataShard::ECumulativeCounters counter, ui64 num = 1) const {
232230
TabletCounters->Cumulative()[counter].Increment(num);
233231
}
@@ -247,11 +245,7 @@ class TColumnShard
247245
ui32 Generation() const { return Executor()->Generation(); }
248246

249247
bool IsUserTable(const TTableId&) const {
250-
return false;
251-
}
252-
253-
const THashMap<ui64, NDataShard::TUserTable::TCPtr> &GetUserTables() const {
254-
return Default<THashMap<ui64, NDataShard::TUserTable::TCPtr>>();
248+
return true;
255249
}
256250

257251
private:

ydb/core/tx/columnshard/transactions/locks_db.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ class TColumnShardLocksDb : public NLocks::TShardLocksDb<TColumnShard, NColumnSh
1717
db.Table<NColumnShard::Schema::Locks>().Key(lockId).Delete();
1818
HasChanges_ = true;
1919
}
20+
21+
bool MayAddLock(ui64) override {
22+
return true;
23+
}
24+
2025
};
2126

2227
}

ydb/core/tx/datashard/datashard_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ class TDataShard
15861586

15871587
void AddUserTable(const TPathId& tableId, TUserTable::TPtr tableInfo) {
15881588
TableInfos[tableId.LocalPathId] = tableInfo;
1589-
SysLocks.UpdateSchema(tableId, *tableInfo);
1589+
SysLocks.UpdateSchema(tableId, tableInfo->KeyColumnTypes);
15901590
Pipeline.GetDepTracker().UpdateSchema(tableId, *tableInfo);
15911591
}
15921592

ydb/core/tx/datashard/datashard_locks_db.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ class TDataShardLocksDb : public NLocks::TShardLocksDb<TDataShard, TDataShard::S
3535
Self.ScheduleRemoveLockChanges(lockId);
3636
}
3737
}
38+
39+
bool MayAddLock(ui64 lockId) override {
40+
for (auto& pr : Self.GetUserTables()) {
41+
auto tid = pr.second->LocalTid;
42+
// We cannot start a new lockId if it has any uncompacted data
43+
if (DB.HasTxData(tid, lockId)) {
44+
return false;
45+
}
46+
}
47+
return true;
48+
}
3849
};
3950

4051
} // namespace NKikimr::NDataShard

ydb/core/tx/datashard/datashard_ut_locks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ namespace NTest {
152152
TmpLockVec.emplace_back(TCell::Make(TmpLock.SchemeShard));
153153
TmpLockVec.emplace_back(TCell::Make(TmpLock.PathId));
154154

155-
Locks.UpdateSchema(tableId.PathId, DataShard.TableInfos[tid]);
155+
Locks.UpdateSchema(tableId.PathId, DataShard.TableInfos[tid].KeyColumnTypes);
156156
}
157157

158158
//

ydb/core/tx/datashard/range_avl_tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "range_tree_base.h"
3+
#include <ydb/core/tx/locks/range_tree_base.h>
44

55
#include <util/generic/hash.h>
66
#include <util/generic/intrlist.h>

ydb/core/tx/datashard/ut_range_treap/CMakeLists.darwin-arm64.txt

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)