Skip to content

Commit 4515671

Browse files
authored
fix(async): set default concurrency to 10 tasks (#2256)
* fix(async): set default concurrency to 10 tasks * fixup
1 parent 0e4cc7e commit 4515671

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/zarr/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def reset(self) -> None:
4343
{
4444
"default_zarr_version": 3,
4545
"array": {"order": "C"},
46-
"async": {"concurrency": None, "timeout": None},
46+
"async": {"concurrency": 10, "timeout": None},
4747
"json_indent": 2,
4848
"codec_pipeline": {
4949
"path": "zarr.codecs.pipeline.BatchedCodecPipeline",

tests/v3/test_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_config_defaults_set() -> None:
4141
{
4242
"default_zarr_version": 3,
4343
"array": {"order": "C"},
44-
"async": {"concurrency": None, "timeout": None},
44+
"async": {"concurrency": 10, "timeout": None},
4545
"json_indent": 2,
4646
"codec_pipeline": {
4747
"path": "zarr.codecs.pipeline.BatchedCodecPipeline",
@@ -62,15 +62,15 @@ def test_config_defaults_set() -> None:
6262
}
6363
]
6464
assert config.get("array.order") == "C"
65-
assert config.get("async.concurrency") is None
65+
assert config.get("async.concurrency") == 10
6666
assert config.get("async.timeout") is None
6767
assert config.get("codec_pipeline.batch_size") == 1
6868
assert config.get("json_indent") == 2
6969

7070

7171
@pytest.mark.parametrize(
7272
("key", "old_val", "new_val"),
73-
[("array.order", "C", "F"), ("async.concurrency", None, 10), ("json_indent", 2, 0)],
73+
[("array.order", "C", "F"), ("async.concurrency", 10, 20), ("json_indent", 2, 0)],
7474
)
7575
def test_config_defaults_can_be_overridden(key: str, old_val: Any, new_val: Any) -> None:
7676
assert config.get(key) == old_val

0 commit comments

Comments
 (0)