Skip to content

Commit f10fe05

Browse files
authored
Merge branch 'stable-25-1' into fix_update_muted_ya_stable_25_1
2 parents 6e0fdc1 + ae0afc8 commit f10fe05

File tree

248 files changed

+6601
-2458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+6601
-2458
lines changed

.github/workflows/nightly_build.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,43 @@
11
name: Nightly-Build # workflow used to upload built binaries to s3
22
on:
3+
schedule:
4+
- cron: "0 3 * * *" # At 03:00 every day
35
workflow_dispatch:
46
inputs:
5-
runner_label:
6-
type: string
7-
default: "auto-provisioned"
8-
description: "runner label"
9-
commit_sha:
10-
type: string
11-
default: ""
7+
use_default_branches:
8+
description: 'If true, run on main and all current stable branches. If false, run only on the current branch.'
9+
type: boolean
10+
required: false
11+
default: true
12+
1213
jobs:
14+
determine_branches:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
branches: ${{ steps.set-branches.outputs.branches }}
18+
steps:
19+
- id: set-branches
20+
run: |
21+
if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.use_default_branches }}" == "true" ]]; then
22+
echo "branches=['main', 'stable-25-1', 'stable-24-4', 'stable-25-1-1', 'stable-25-1-analytics']" >> $GITHUB_OUTPUT
23+
else
24+
echo "branches=['${{ github.ref_name }}']" >> $GITHUB_OUTPUT
25+
fi
26+
1327
build_and_test:
28+
needs: determine_branches
1429
strategy:
1530
fail-fast: false
1631
matrix:
1732
build_preset: ["release", "relwithdebinfo", "release-asan"]
33+
branch: ${{ fromJSON(needs.determine_branches.outputs.branches) }}
1834
runs-on: [ self-hosted, auto-provisioned, "${{ format('build-preset-{0}', matrix.build_preset) }}" ]
19-
name: Build and test ${{ matrix.build_preset }}
35+
name: Build and test ${{ matrix.build_preset }} on ${{ matrix.branch }}
2036
steps:
2137
- name: Checkout
2238
uses: actions/checkout@v4
2339
with:
24-
ref: ${{ inputs.commit_sha }}
40+
ref: ${{ matrix.branch }}
2541
fetch-depth: 2
2642
- name: Setup ydb access
2743
uses: ./.github/actions/setup_ci_ydb_service_account_key_file_credentials
@@ -51,4 +67,4 @@ jobs:
5167
shell: bash
5268
run: |
5369
set -x
54-
s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "ydb/apps/ydbd/ydbd" "s3://ydb-builds/${{ github.ref_name }}/${{ matrix.build_preset }}/ydbd" -d
70+
s3cmd sync --follow-symlinks --acl-public --no-progress --stats --no-check-md5 "ydb/apps/ydbd/ydbd" "s3://ydb-builds/${{ matrix.branch }}/${{ matrix.build_preset }}/ydbd" -d

.github/workflows/run_tests.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run tests
1+
name: Run-tests
22

33
on:
44
workflow_call:
@@ -68,10 +68,6 @@ on:
6868
- release-msan
6969
- release-tsan
7070
default: relwithdebinfo
71-
branches:
72-
description: 'Branches to test (JSON array or single branch name)'
73-
required: false
74-
default: '["main"]'
7571

7672
jobs:
7773
prepare:
@@ -81,17 +77,27 @@ jobs:
8177
steps:
8278
- name: Set branches
8379
id: set-branches
80+
env:
81+
CALLED_BRANCHES: '${{ inputs.branches }}'
8482
run: |
85-
INPUT_BRANCHES='${{ inputs.branches }}'
86-
# Check if input is a JSON array
87-
if [[ $INPUT_BRANCHES == \[* ]]; then
88-
echo "branch_array=$INPUT_BRANCHES" >> $GITHUB_OUTPUT
83+
# Проверяем, был ли передан параметр branches из вызывающего workflow
84+
if [[ -n "$CALLED_BRANCHES" ]]; then
85+
echo "Branches parameter provided from calling workflow: $CALLED_BRANCHES"
86+
87+
# Проверяем, является ли вход уже JSON-массивом
88+
if [[ $CALLED_BRANCHES == \[* ]]; then
89+
echo "branch_array=$CALLED_BRANCHES" >> $GITHUB_OUTPUT
90+
else
91+
# Если это одна ветка, создаем JSON-массив с одним элементом
92+
echo "branch_array=[\"$CALLED_BRANCHES\"]" >> $GITHUB_OUTPUT
93+
fi
8994
else
90-
# If it's a single branch, create a JSON array with one element
91-
echo "branch_array=[\"$INPUT_BRANCHES\"]" >> $GITHUB_OUTPUT
95+
# Если ветки не переданы, значит это прямой запуск workflow_dispatch
96+
echo "No branches specified, using current branch: ${{ github.ref_name }}"
97+
echo "branch_array=[\"${{ github.ref_name }}\"]" >> $GITHUB_OUTPUT
9298
fi
9399
94-
echo "Using branches: $(cat $GITHUB_OUTPUT | grep branch_array | cut -d= -f2)"
100+
echo "Final branches to use: $(cat $GITHUB_OUTPUT | grep branch_array | cut -d= -f2)"
95101
96102
run_tests:
97103
needs: prepare

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,7 @@ bin/config.json
8888

8989
# handy for local junk, which is not intended to appear in the repo
9090
junk/
91+
92+
# YDB CLI configuration file location is `~/ydb/config/config.yaml`
93+
config/config.yaml
94+
path.bash.inc

ydb/core/blobstorage/nodewarden/node_warden_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ bool NKikimr::NStorage::DeriveStorageConfig(const NKikimrConfig::TAppConfig& app
15281528

15291529
// find state storage setup for that domain
15301530
for (const auto& ss : domains.GetStateStorage()) {
1531-
if (domain.SSIdSize() == 1 && ss.GetSSId() == domain.GetSSId(0)) {
1531+
if (domain.SSIdSize() == 0 || (domain.SSIdSize() == 1 && ss.GetSSId() == domain.GetSSId(0))) {
15321532
const bool hadStateStorageConfig = config->HasStateStorageConfig();
15331533
const bool hadStateStorageBoardConfig = config->HasStateStorageBoardConfig();
15341534
const bool hadSchemeBoardConfig = config->HasSchemeBoardConfig();

ydb/core/driver_lib/run/run.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,40 @@ void TKikimrRunner::InitializeGRpc(const TKikimrRunConfig& runConfig) {
946946
opts.SetMaxMessageSize(grpcConfig.HasMaxMessageSize() ? grpcConfig.GetMaxMessageSize() : NYdbGrpc::DEFAULT_GRPC_MESSAGE_SIZE_LIMIT);
947947
opts.SetMaxGlobalRequestInFlight(grpcConfig.GetMaxInFlight());
948948
opts.SetLogger(NYdbGrpc::CreateActorSystemLogger(*ActorSystem.Get(), NKikimrServices::GRPC_SERVER));
949+
switch(grpcConfig.GetDefaultCompressionAlgorithm()) {
950+
case NKikimrConfig::TGRpcConfig::YDB_GRPC_COMPRESS_NONE: {
951+
opts.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_NONE);
952+
break;
953+
}
954+
case NKikimrConfig::TGRpcConfig::YDB_GRPC_COMPRESS_DEFLATE: {
955+
opts.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_DEFLATE);
956+
break;
957+
}
958+
case NKikimrConfig::TGRpcConfig::YDB_GRPC_COMPRESS_GZIP: {
959+
opts.SetDefaultCompressionAlgorithm(GRPC_COMPRESS_GZIP);
960+
break;
961+
}
962+
}
963+
964+
switch(grpcConfig.GetDefaultCompressionLevel()) {
965+
case NKikimrConfig::TGRpcConfig::YDB_GRPC_COMPRESS_LEVEL_NONE: {
966+
opts.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_NONE);
967+
break;
968+
}
969+
970+
case NKikimrConfig::TGRpcConfig::YDB_GRPC_COMPRESS_LEVEL_LOW: {
971+
opts.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_LOW);
972+
break;
973+
}
974+
case NKikimrConfig::TGRpcConfig::YDB_GRPC_COMPRESS_LEVEL_MED: {
975+
opts.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_MED);
976+
break;
977+
}
978+
case NKikimrConfig::TGRpcConfig::YDB_GRPC_COMPRESS_LEVEL_HIGH: {
979+
opts.SetDefaultCompressionLevel(GRPC_COMPRESS_LEVEL_HIGH);
980+
break;
981+
}
982+
}
949983

950984
if (appConfig.HasDomainsConfig() &&
951985
appConfig.GetDomainsConfig().HasSecurityConfig() &&

ydb/core/grpc_services/rpc_read_rows.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,14 @@ class TReadRowsRPC : public TActorBootstrapped<TReadRowsRPC> {
732732
SendResult(status, errorMsg, issues);
733733
}
734734

735+
void Handle(TEvents::TEvUndelivered::TPtr&) {
736+
return ReplyWithError(Ydb::StatusIds::INTERNAL_ERROR, "Internal error: pipe cache is not available, the cluster might not be configured properly");
737+
}
738+
739+
void Handle(TEvPipeCache::TEvDeliveryProblem::TPtr &ev) {
740+
return ReplyWithError(Ydb::StatusIds::UNAVAILABLE, TStringBuilder() << "Failed to connect to shard " << ev->Get()->TabletId);
741+
}
742+
735743
void PassAway() override {
736744
Send(PipeCache, new TEvPipeCache::TEvUnlink(0));
737745
if (TimeoutTimerActorId) {
@@ -748,6 +756,9 @@ class TReadRowsRPC : public TActorBootstrapped<TReadRowsRPC> {
748756
hFunc(TEvTxProxySchemeCache::TEvResolveKeySetResult, Handle);
749757
hFunc(TEvDataShard::TEvReadResult, Handle);
750758

759+
hFunc(TEvents::TEvUndelivered, Handle);
760+
hFunc(TEvPipeCache::TEvDeliveryProblem, Handle);
761+
751762
hFunc(TEvents::TEvWakeup, HandleTimeout);
752763
}
753764
}

ydb/core/persqueue/pq_impl.cpp

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2904,9 +2904,41 @@ void TPersQueue::Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev, const TActo
29042904
return;
29052905
}
29062906

2907+
if (ev->Get()->Dead) {
2908+
AckReadSetsToTablet(ev->Get()->TabletId, ctx);
2909+
return;
2910+
}
2911+
29072912
RestartPipe(ev->Get()->TabletId, ctx);
29082913
}
29092914

2915+
void TPersQueue::AckReadSetsToTablet(ui64 tabletId, const TActorContext& ctx)
2916+
{
2917+
THashSet<TDistributedTransaction*> txs;
2918+
2919+
for (ui64 txId : GetBindedTxs(tabletId)) {
2920+
auto* tx = GetTransaction(ctx, txId);
2921+
if (!tx) {
2922+
continue;
2923+
}
2924+
2925+
tx->OnReadSetAck(tabletId);
2926+
tx->UnbindMsgsFromPipe(tabletId);
2927+
2928+
txs.insert(tx);
2929+
}
2930+
2931+
if (txs.empty()) {
2932+
return;
2933+
}
2934+
2935+
for (auto* tx : txs) {
2936+
TryExecuteTxs(ctx, *tx);
2937+
}
2938+
2939+
TryWriteTxs(ctx);
2940+
}
2941+
29102942
void TPersQueue::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActorContext& ctx)
29112943
{
29122944
PQ_LOG_D("Handle TEvTabletPipe::TEvClientDestroyed");
@@ -2919,7 +2951,7 @@ void TPersQueue::Handle(TEvTabletPipe::TEvClientDestroyed::TPtr& ev, const TActo
29192951

29202952
void TPersQueue::RestartPipe(ui64 tabletId, const TActorContext& ctx)
29212953
{
2922-
for (auto& txId: GetBindedTxs(tabletId)) {
2954+
for (ui64 txId : GetBindedTxs(tabletId)) {
29232955
auto* tx = GetTransaction(ctx, txId);
29242956
if (!tx) {
29252957
continue;

ydb/core/persqueue/pq_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@ class TPersQueue : public NKeyValue::TKeyValueFlat {
566566

567567
void AddPendingEvent(IEventHandle* ev);
568568
void ProcessPendingEvents();
569+
570+
void AckReadSetsToTablet(ui64 tabletId, const TActorContext& ctx);
569571
};
570572

571573

ydb/core/persqueue/transaction.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,13 @@ void TDistributedTransaction::OnReadSetAck(const NKikimrTx::TEvReadSetAck& event
312312
Y_ABORT_UNLESS(event.HasStep() && (Step == event.GetStep()));
313313
Y_ABORT_UNLESS(event.HasTxId() && (TxId == event.GetTxId()));
314314

315-
if (PredicateRecipients.contains(event.GetTabletConsumer())) {
316-
PredicateRecipients[event.GetTabletConsumer()] = true;
315+
OnReadSetAck(event.GetTabletConsumer());
316+
}
317+
318+
void TDistributedTransaction::OnReadSetAck(ui64 tabletId)
319+
{
320+
if (PredicateRecipients.contains(tabletId)) {
321+
PredicateRecipients[tabletId] = true;
317322
++PredicateAcksCount;
318323

319324
PQ_LOG_D("Predicate acks " << PredicateAcksCount << "/" << PredicateRecipients.size());

ydb/core/persqueue/transaction.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ struct TDistributedTransaction {
3434
const TActorId& sender,
3535
std::unique_ptr<TEvTxProcessing::TEvReadSetAck> ack);
3636
void OnReadSetAck(const NKikimrTx::TEvReadSetAck& event);
37+
void OnReadSetAck(ui64 tabletId);
3738
void OnTxCommitDone(const TEvPQ::TEvTxCommitDone& event);
3839

3940
using EDecision = NKikimrTx::TReadSetData::EDecision;

0 commit comments

Comments
 (0)