vastdb 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vastdb/_internal.py +1 -1
- vastdb/schema.py +5 -1
- vastdb/vast_tests/test_scale.py +34 -0
- {vastdb-1.3.0.dist-info → vastdb-1.3.2.dist-info}/METADATA +1 -1
- {vastdb-1.3.0.dist-info → vastdb-1.3.2.dist-info}/RECORD +8 -8
- {vastdb-1.3.0.dist-info → vastdb-1.3.2.dist-info}/LICENSE +0 -0
- {vastdb-1.3.0.dist-info → vastdb-1.3.2.dist-info}/WHEEL +0 -0
- {vastdb-1.3.0.dist-info → vastdb-1.3.2.dist-info}/top_level.txt +0 -0
vastdb/_internal.py
CHANGED
|
@@ -866,7 +866,7 @@ class VastdbApi:
|
|
|
866
866
|
res = self._session.request(method=method, url=url, timeout=self.timeout, **kwargs)
|
|
867
867
|
except requests.exceptions.ConnectionError as err:
|
|
868
868
|
# low-level connection issue, it is safe to retry only read-only requests
|
|
869
|
-
may_retry = (method
|
|
869
|
+
may_retry = (method in {"HEAD", "GET"})
|
|
870
870
|
raise errors.ConnectionError(cause=err, may_retry=may_retry) from err
|
|
871
871
|
|
|
872
872
|
if not skip_status_check:
|
vastdb/schema.py
CHANGED
|
@@ -77,7 +77,11 @@ class Schema:
|
|
|
77
77
|
return result
|
|
78
78
|
|
|
79
79
|
def create_table(self, table_name: str, columns: pa.Schema, fail_if_exists=True, use_external_row_ids_allocation=False) -> "Table":
|
|
80
|
-
"""Create a new table under this schema.
|
|
80
|
+
"""Create a new table under this schema.
|
|
81
|
+
|
|
82
|
+
A virtual `vastdb_rowid` column (of `int64` type) can be created to access and filter by internal VAST row IDs.
|
|
83
|
+
See https://support.vastdata.com/s/article/UUID-48d0a8cf-5786-5ef3-3fa3-9c64e63a0967 for more details.
|
|
84
|
+
"""
|
|
81
85
|
if current := self.table(table_name, fail_if_missing=False):
|
|
82
86
|
if fail_if_exists:
|
|
83
87
|
raise errors.TableExists(self.bucket.name, self.name, table_name)
|
vastdb/vast_tests/test_scale.py
CHANGED
|
@@ -66,3 +66,37 @@ def test_table_stats(session, test_bucket_name, schema_name, table_name):
|
|
|
66
66
|
logger.info("inserted to table")
|
|
67
67
|
assert new_stat.size_in_bytes != initial_stat.size_in_bytes
|
|
68
68
|
assert new_stat.num_rows - NUM_TIMES_TO_INSERT == initial_stat.num_rows
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def test_ndu_while_querying(session, test_bucket_name, schema_name, table_name):
|
|
72
|
+
"""
|
|
73
|
+
Executing queries while a NDU takes place.
|
|
74
|
+
"""
|
|
75
|
+
amount_of_queries_in_parallel = 5
|
|
76
|
+
config = QueryConfig(num_splits=1, num_sub_splits=1)
|
|
77
|
+
logger.info(f'{test_bucket_name=}, {schema_name=}, {table_name=}')
|
|
78
|
+
|
|
79
|
+
seed = random.randint(0, 100)
|
|
80
|
+
logger.info(f'{seed=}')
|
|
81
|
+
r = random.Random(seed)
|
|
82
|
+
|
|
83
|
+
def _execute_single_query(expected=None):
|
|
84
|
+
time.sleep(r.random())
|
|
85
|
+
with session.transaction() as tx:
|
|
86
|
+
t = tx.bucket(test_bucket_name).schema(schema_name).table(table_name)
|
|
87
|
+
s = time.time()
|
|
88
|
+
res = t.select(config=config).read_all()
|
|
89
|
+
e = time.time()
|
|
90
|
+
if expected:
|
|
91
|
+
assert expected == res
|
|
92
|
+
logger.info(f'query took {e - s}')
|
|
93
|
+
return res
|
|
94
|
+
|
|
95
|
+
initial_res = _execute_single_query()
|
|
96
|
+
for i in range(300):
|
|
97
|
+
with ThreadPoolExecutor() as executor:
|
|
98
|
+
futures = [executor.submit(_execute_single_query, initial_res) for _ in range(amount_of_queries_in_parallel)]
|
|
99
|
+
for future in futures:
|
|
100
|
+
future.result()
|
|
101
|
+
|
|
102
|
+
logger.info(f"finished running {amount_of_queries_in_parallel} queries, loop {i}")
|
|
@@ -149,13 +149,13 @@ vast_flatbuf/tabular/S3File.py,sha256=KC9c2oS5-JXwTTriUVFdjOvRG0B54Cq9kviSDZY3NI
|
|
|
149
149
|
vast_flatbuf/tabular/VipRange.py,sha256=_BJd1RRZAcK76T9vlsHzXKYVsPVaz6WTEAqStMQCAUQ,2069
|
|
150
150
|
vast_flatbuf/tabular/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
151
151
|
vastdb/__init__.py,sha256=J1JjKiFkKC95BHowfh9kJfQFTjRce-QMsc6zF_FfxC0,432
|
|
152
|
-
vastdb/_internal.py,sha256=
|
|
152
|
+
vastdb/_internal.py,sha256=LmiiNmUqJFfNGUoe362sHwU8M3aKbN1VWYIvobrgeK8,92322
|
|
153
153
|
vastdb/bucket.py,sha256=5KuKhPjZOevznZqWHDVVocejvAy7dcwobPuV6BJCfPc,2544
|
|
154
154
|
vastdb/config.py,sha256=1tMYtzKXerGcIUjH4tIGEvZNWvO4fviCEdcNCnELJZo,2269
|
|
155
155
|
vastdb/conftest.py,sha256=X2kVveySPQYZlVBXUMoo7Oea5IsvmJzjdqq3fpH2kVw,3469
|
|
156
156
|
vastdb/errors.py,sha256=2XR1ko7J5nkfiHSAgwuVAADw0SsyqxOwSeFaGgKZEXM,4186
|
|
157
157
|
vastdb/features.py,sha256=DxV746LSkORwVSD6MP2hdXRfnyoLkJwtOwGmp1dnquo,1322
|
|
158
|
-
vastdb/schema.py,sha256=
|
|
158
|
+
vastdb/schema.py,sha256=EzTj0dIjLI23A2SAI1rYdhB6YqHdWSE4BBSqiKFbDtw,6418
|
|
159
159
|
vastdb/session.py,sha256=toMR0BXwTaECdWDKnIZky1F3MA1SmelRBiqCrqQ3GCM,2067
|
|
160
160
|
vastdb/table.py,sha256=C6Zz0zolRRRbf5EQBvDRAofl3kGvfz4PjZwGeQongTI,31106
|
|
161
161
|
vastdb/transaction.py,sha256=NlVkEowJ_pmtffjWBBDaKExYDKPekjSZyj_fK_bZPJE,3026
|
|
@@ -201,9 +201,9 @@ vastdb/tests/test_util.py,sha256=n7gvT5Wg6b6bxgqkFXkYqvFd_W1GlUdVfmPv66XYXyA,195
|
|
|
201
201
|
vastdb/tests/util.py,sha256=dpRJYbboDnlqL4qIdvScpp8--5fxRUBIcIYitrfcj9o,555
|
|
202
202
|
vastdb/vast_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
203
203
|
vastdb/vast_tests/test_ha.py,sha256=744P4G6VJ09RIkHhMQL4wlipCBJWQVMhyvUrSc4k1HQ,975
|
|
204
|
-
vastdb/vast_tests/test_scale.py,sha256=
|
|
205
|
-
vastdb-1.3.
|
|
206
|
-
vastdb-1.3.
|
|
207
|
-
vastdb-1.3.
|
|
208
|
-
vastdb-1.3.
|
|
209
|
-
vastdb-1.3.
|
|
204
|
+
vastdb/vast_tests/test_scale.py,sha256=5jGwOdZH6Tv5tPdZYPWoqcxOceI2jA5i2D1zNKZHER4,3958
|
|
205
|
+
vastdb-1.3.2.dist-info/LICENSE,sha256=obffan7LYrq7hLHNrY7vHcn2pKUTBUYXMKu-VOAvDxU,11333
|
|
206
|
+
vastdb-1.3.2.dist-info/METADATA,sha256=NWJHQlPY-3V5nFmm9dLysGrLN7POvhVjq1qbFDfsr64,1340
|
|
207
|
+
vastdb-1.3.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
208
|
+
vastdb-1.3.2.dist-info/top_level.txt,sha256=Vsj2MKtlhPg0J4so64slQtnwjhgoPmJgcG-6YcVAwVc,20
|
|
209
|
+
vastdb-1.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|