Skip to content

Commit 43842c1

Browse files
authored
Merge branch 'stable-24-3' into merge/24-3/acceleration
2 parents 550ba0c + bbe9214 commit 43842c1

File tree

3,162 files changed

+98915
-53855
lines changed

Some content is hidden

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

3,162 files changed

+98915
-53855
lines changed

.github/actions/s3cmd/action.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ inputs:
88
required: true
99
description: "s3 key secret"
1010
s3_bucket:
11-
required: true
11+
required: false
1212
description: "s3 bucket"
1313
s3_endpoint:
1414
required: true
1515
description: "s3 endpoint"
1616
folder_prefix:
17-
required: true
17+
required: false
1818
description: "folder prefix"
1919
build_preset:
20-
required: true
20+
required: false
2121
description: "build preset like relwithdebinfo"
2222
runs:
2323
using: "composite"
@@ -35,7 +35,14 @@ runs:
3535
host_base = storage.yandexcloud.net
3636
host_bucket = %(bucket)s.storage.yandexcloud.net
3737
EOF
38-
38+
env:
39+
s3_key_id: ${{ inputs.s3_key_id }}
40+
s3_secret_access_key: ${{ inputs.s3_key_secret }}
41+
42+
- name: export s3 path variables
43+
shell: bash
44+
if: inputs.build_preset
45+
run: |
3946
folder="${{ runner.arch == 'X64' && 'x86-64' || runner.arch == 'ARM64' && 'arm64' || 'unknown' }}"
4047
4148
BUILD_PRESET="${{ inputs.build_preset }}"
@@ -57,7 +64,4 @@ runs:
5764
echo "S3_BUCKET_PATH=s3://${{ inputs.s3_bucket }}/${{ github.repository }}/${{github.workflow}}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
5865
echo "S3_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
5966
echo "S3_TEST_ARTIFACTS_BUCKET_PATH=s3://${{ inputs.s3_bucket }}/testing_out_stuff/${{ github.repository }}/${{github.workflow}}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
60-
echo "S3_TEST_ARTIFACTS_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/testing_out_stuff/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
61-
env:
62-
s3_key_id: ${{ inputs.s3_key_id }}
63-
s3_secret_access_key: ${{ inputs.s3_key_secret }}
67+
echo "S3_TEST_ARTIFACTS_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/testing_out_stuff/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV

.github/config/muted_ya.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,30 @@ ydb/core/external_sources *
88
ydb/core/quoter/ut QuoterWithKesusTest.PrefetchCoefficient
99
ydb/core/keyvalue/ut_trace TKeyValueTracingTest.*
1010
ydb/core/kqp/provider/ut KikimrIcGateway.TestLoadBasicSecretValueFromExternalDataSourceMetadata
11+
ydb/core/kqp/ut/join KqpJoinOrder.Chain65Nodes
1112
ydb/core/kqp/ut/olap KqpOlapBlobsSharing.*
1213
ydb/core/kqp/ut/olap KqpOlapStatistics.StatsUsageWithTTL
13-
ydb/core/kqp/ut/olap KqpOlapAggregations.Aggregation_ResultCountAll_FilterL
14-
ydb/core/kqp/ut/olap KqpOlapWrite.WriteDeleteCleanGC
1514
ydb/core/kqp/ut/pg KqpPg.CreateIndex
15+
ydb/core/kqp/ut/tx KqpLocksTricky.TestNoLocksIssueInteractiveTx+withSink
16+
ydb/core/kqp/ut/tx KqpLocksTricky.TestNoLocksIssue+withSink
17+
ydb/core/kqp/ut/tx KqpSnapshotRead.ReadOnlyTxWithIndexCommitsOnConcurrentWrite+withSink
18+
ydb/core/kqp/ut/tx KqpSinkTx.InvalidateOnError
1619
ydb/core/kqp/ut/query KqpLimits.QueryReplySize
1720
ydb/core/kqp/ut/query KqpQuery.QueryTimeout
21+
ydb/core/kqp/ut/service KqpQueryService.TableSink_OltpReplace+HasSecondaryIndex
1822
ydb/core/kqp/ut/scan KqpRequestContext.TraceIdInErrorMessage
1923
ydb/core/kqp/ut/scheme KqpOlapScheme.TenThousandColumns
20-
ydb/core/kqp/ut/scheme KqpOlap.OlapRead_GenericQuerys
21-
ydb/core/kqp/ut/scheme KqpOlap.OlapRead_StreamGenericQuery
22-
ydb/core/kqp/ut/scheme KqpOlap.OlapRead_UsesGenericQueryOnJoinWithDataShardTable
23-
ydb/core/kqp/ut/scheme KqpOlapScheme.DropTable
2424
ydb/core/kqp/ut/scheme KqpScheme.AlterAsyncReplication
2525
ydb/core/kqp/ut/scheme KqpScheme.QueryWithAlter
2626
ydb/core/kqp/ut/scheme [14/50]*
2727
ydb/core/kqp/ut/scheme [15/50]*
2828
ydb/core/kqp/ut/scheme [44/50]*
2929
ydb/core/kqp/ut/service KqpQueryService.ExecuteQueryPgTableSelect
3030
ydb/core/kqp/ut/service KqpQueryService.QueryOnClosedSession
31+
ydb/core/kqp/ut/service KqpQueryService.TableSink_OltpUpdate
3132
ydb/core/kqp/ut/service KqpService.CloseSessionsWithLoad
3233
ydb/core/kqp/ut/service [38/50]*
34+
ydb/core/kqp/ut/service KqpQueryService.TableSink_OltpReplace+HasSecondaryIndex
3335
ydb/core/persqueue/ut [37/40] chunk chunk
3436
ydb/core/persqueue/ut [38/40] chunk chunk
3537
ydb/core/persqueue/ut TPQTest.*DirectRead*
@@ -96,7 +98,6 @@ ydb/tests/fq/yds *
9698
ydb/tests/fq/control_plane_storage *
9799
ydb/tests/functional/audit *
98100
ydb/tests/functional/blobstorage test_replication.py.TestReplicationAfterNodesRestart.test_replication*
99-
ydb/tests/functional/clickbench test.py.test_plans[column]
100101
ydb/tests/functional/kqp/kqp_indexes ConsistentIndexRead.InteractiveTx
101102
ydb/tests/functional/kqp/kqp_query_session KqpQuerySession.NoLocalAttach
102103
ydb/tests/functional/restarts test_restarts.py.*
@@ -106,4 +107,6 @@ ydb/tests/functional/tenants test_storage_config.py.TestStorageConfig.*
106107
ydb/tests/functional/tenants test_tenants.py.*
107108
ydb/tests/functional/ydb_cli test_ydb_impex.py.TestImpex.test_big_dataset*
108109
ydb/tests/tools/pq_read/test test_timeout.py.TestTimeout.test_timeout
110+
ydb/core/kqp/ut/olap KqpDecimalColumnShard.TestFilterCompare
111+
ydb/core/kqp/ut/olap KqpDecimalColumnShard.TestAggregation
109112
ydb/tests/functional/rename [test_rename.py */10] chunk chunk

.github/workflows/nightly_build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Nightly-Build # workflow used to upload built binaries to s3
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
runner_label:
6+
type: string
7+
default: "auto-provisioned"
8+
description: "runner label"
9+
commit_sha:
10+
type: string
11+
default: ""
12+
jobs:
13+
build_and_test:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
build_preset: ["relwithdebinfo", "release-asan"]
18+
runs-on: [ self-hosted, auto-provisioned, "${{ format('build-preset-{0}', matrix.build_preset) }}" ]
19+
name: Build and test ${{ matrix.build_preset }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ inputs.commit_sha }}
25+
fetch-depth: 2
26+
- name: Setup ydb access
27+
uses: ./.github/actions/setup_ci_ydb_service_account_key_file_credentials
28+
with:
29+
ci_ydb_service_account_key_file_credentials: ${{ secrets.CI_YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS }}
30+
- name: Build and test
31+
uses: ./.github/actions/build_and_test_ya
32+
with:
33+
build_preset: ${{ matrix.build_preset }}
34+
build_target: "ydb/apps/ydbd"
35+
increment: false
36+
run_tests: false
37+
put_build_results_to_cache: false
38+
secs: ${{ format('{{"TESTMO_TOKEN2":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
39+
secrets.TESTMO_TOKEN2, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
40+
vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","TESTMO_URL":"{3}","TESTMO_PROJECT_ID":"{4}"}}',
41+
vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.TESTMO_URL, vars.TESTMO_PROJECT_ID ) }}
42+
- name: Setup s3cmd
43+
uses: ./.github/actions/s3cmd
44+
with:
45+
s3_bucket: "ydb-builds"
46+
s3_endpoint: ${{ vars.AWS_ENDPOINT }}
47+
s3_key_id: ${{ secrets.AWS_KEY_ID }}
48+
s3_key_secret: ${{ secrets.AWS_KEY_VALUE }}
49+
50+
- name: sync results to s3 and publish links
51+
shell: bash
52+
run: |
53+
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

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
!*/
88
# Unignore all files inside canondata dir
99
!**/canondata/**
10+
# Allow docker files
11+
!Dockerfile
1012

1113
/canonization_show_res.log
1214

@@ -26,6 +28,9 @@ __pycache__/
2628
*.pb.h
2729
*.pb.cc
2830

31+
# Other generated
32+
*.fbs.h
33+
2934
# MacOS specific
3035
.DS_Store
3136

@@ -40,6 +45,7 @@ __pycache__/
4045
.idea/
4146
.vscode/
4247
.clangd
48+
.antlr/
4349

4450
# KDevelop IDE
4551
*.kdev4
@@ -79,3 +85,6 @@ list_result.log
7985
bin/config.json
8086

8187
.vs/
88+
89+
# handy for local junk, which is not intended to appear in the repo
90+
junk/

library/cpp/threading/future/core/future-inl.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ namespace NThreading {
116116
bool HasException() const {
117117
return AtomicGet(State) == ExceptionSet;
118118
}
119+
bool IsReady() const {
120+
return AtomicGet(State) != NotReady;
121+
}
119122

120123
const T& GetValue(TDuration timeout = TDuration::Zero()) const {
121124
AccessValue(timeout, ValueRead);
@@ -297,6 +300,9 @@ namespace NThreading {
297300
bool HasException() const {
298301
return AtomicGet(State) == ExceptionSet;
299302
}
303+
bool IsReady() const {
304+
return AtomicGet(State) != NotReady;
305+
}
300306

301307
void GetValue(TDuration timeout = TDuration::Zero()) const {
302308
TAtomicBase state = AtomicGet(State);
@@ -583,6 +589,10 @@ namespace NThreading {
583589
inline bool TFuture<T>::HasException() const {
584590
return State && State->HasException();
585591
}
592+
template <typename T>
593+
inline bool TFuture<T>::IsReady() const {
594+
return State && State->IsReady();
595+
}
586596

587597
template <typename T>
588598
inline void TFuture<T>::Wait() const {
@@ -688,6 +698,9 @@ namespace NThreading {
688698
inline bool TFuture<void>::HasException() const {
689699
return State && State->HasException();
690700
}
701+
inline bool TFuture<void>::IsReady() const {
702+
return State && State->IsReady();
703+
}
691704

692705
inline void TFuture<void>::Wait() const {
693706
EnsureInitialized();
@@ -823,6 +836,11 @@ namespace NThreading {
823836
return State && State->HasException();
824837
}
825838

839+
template <typename T>
840+
inline bool TPromise<T>::IsReady() const {
841+
return State && State->IsReady();
842+
}
843+
826844
template <typename T>
827845
inline void TPromise<T>::SetException(const TString& e) {
828846
EnsureInitialized();
@@ -904,6 +922,10 @@ namespace NThreading {
904922
return State && State->HasException();
905923
}
906924

925+
inline bool TPromise<void>::IsReady() const {
926+
return State && State->IsReady();
927+
}
928+
907929
inline void TPromise<void>::SetException(const TString& e) {
908930
EnsureInitialized();
909931
State->SetException(std::make_exception_ptr(yexception() << e));

library/cpp/threading/future/core/future.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ namespace NThreading {
9898
void TryRethrow() const;
9999
bool HasException() const;
100100

101+
// returns true if exception or value was set.
102+
// allows to check readiness without locking cheker-thread
103+
// NOTE: returns true even if value was extracted from promise
104+
// good replace for HasValue() || HasException()
105+
bool IsReady() const;
106+
101107
void Wait() const;
102108
bool Wait(TDuration timeout) const;
103109
bool Wait(TInstant deadline) const;
@@ -153,6 +159,11 @@ namespace NThreading {
153159
void TryRethrow() const;
154160
bool HasException() const;
155161

162+
// returns true if exception or value was set.
163+
// allows to check readiness without locking cheker-thread
164+
// good replace for HasValue() || HasException()
165+
bool IsReady() const;
166+
156167
void Wait() const;
157168
bool Wait(TDuration timeout) const;
158169
bool Wait(TInstant deadline) const;
@@ -216,6 +227,12 @@ namespace NThreading {
216227

217228
void TryRethrow() const;
218229
bool HasException() const;
230+
231+
// returns true if exception or value was set.
232+
// allows to check readiness without locking cheker-thread
233+
// NOTE: returns true even if value was extracted from promise
234+
// good replace for HasValue() || HasException()
235+
bool IsReady() const;
219236
void SetException(const TString& e);
220237
void SetException(std::exception_ptr e);
221238
bool TrySetException(std::exception_ptr e);
@@ -256,6 +273,11 @@ namespace NThreading {
256273

257274
void TryRethrow() const;
258275
bool HasException() const;
276+
277+
// returns true if exception or value was set.
278+
// allows to check readiness without locking cheker-thread
279+
// good replace for HasValue() || HasException()
280+
bool IsReady() const;
259281
void SetException(const TString& e);
260282
void SetException(std::exception_ptr e);
261283
bool TrySetException(std::exception_ptr e);

library/cpp/threading/future/future_ut.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ namespace {
105105

106106
future = MakeFuture(345);
107107
UNIT_ASSERT(future.HasValue());
108+
UNIT_ASSERT(future.IsReady());
108109
UNIT_ASSERT_EQUAL(future.GetValue(), 345);
109110
}
110111

@@ -115,6 +116,7 @@ namespace {
115116

116117
TFuture<void> future = promise.GetFuture();
117118
UNIT_ASSERT(future.HasValue());
119+
UNIT_ASSERT(future.IsReady());
118120

119121
future = MakeFuture();
120122
UNIT_ASSERT(future.HasValue());
@@ -523,6 +525,7 @@ namespace {
523525
{
524526
auto future1 = MakeErrorFuture<void>(std::make_exception_ptr(TFutureException()));
525527
UNIT_ASSERT(future1.HasException());
528+
UNIT_ASSERT(future1.IsReady());
526529
UNIT_CHECK_GENERATED_EXCEPTION(future1.GetValue(), TFutureException);
527530

528531
auto future2 = MakeErrorFuture<int>(std::make_exception_ptr(TFutureException()));
@@ -563,6 +566,7 @@ namespace {
563566
promise2.SetException("foo-exception");
564567
wait.Wait();
565568
UNIT_ASSERT(future2.HasException());
569+
UNIT_ASSERT(!future1.IsReady());
566570
UNIT_ASSERT(!future1.HasValue() && !future1.HasException());
567571
}
568572

0 commit comments

Comments
 (0)