oxidedb 0.1.0__tar.gz

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.
Files changed (129) hide show
  1. oxidedb-0.1.0/.github/workflows/publish.yml +63 -0
  2. oxidedb-0.1.0/.github/workflows/tests.yml +45 -0
  3. oxidedb-0.1.0/.gitignore +25 -0
  4. oxidedb-0.1.0/LICENSE +21 -0
  5. oxidedb-0.1.0/PKG-INFO +1124 -0
  6. oxidedb-0.1.0/README.md +1094 -0
  7. oxidedb-0.1.0/docs/blog/README.md +16 -0
  8. oxidedb-0.1.0/docs/blog/prototype-to-product-zh-csdn.md +82 -0
  9. oxidedb-0.1.0/docs/blog/prototype-to-product-zh-wechat.md +74 -0
  10. oxidedb-0.1.0/docs/blog/prototype-to-product-zh.md +66 -0
  11. oxidedb-0.1.0/docs/blog/readindex-zh-csdn.md +268 -0
  12. oxidedb-0.1.0/docs/blog/readindex-zh-wechat.md +262 -0
  13. oxidedb-0.1.0/docs/blog/readindex-zh.md +251 -0
  14. oxidedb-0.1.0/docs/design.md +893 -0
  15. oxidedb-0.1.0/docs/recovery.md +696 -0
  16. oxidedb-0.1.0/examples/basic_usage.py +41 -0
  17. oxidedb-0.1.0/oxidedb/__init__.py +1 -0
  18. oxidedb-0.1.0/oxidedb/channels.py +63 -0
  19. oxidedb-0.1.0/oxidedb/cli.py +388 -0
  20. oxidedb-0.1.0/oxidedb/client/__init__.py +22 -0
  21. oxidedb-0.1.0/oxidedb/client/node_client.py +303 -0
  22. oxidedb-0.1.0/oxidedb/client/remote_group_client.py +380 -0
  23. oxidedb-0.1.0/oxidedb/client/remote_node_client.py +317 -0
  24. oxidedb-0.1.0/oxidedb/client/routing.py +469 -0
  25. oxidedb-0.1.0/oxidedb/database.py +53 -0
  26. oxidedb-0.1.0/oxidedb/groups.py +73 -0
  27. oxidedb-0.1.0/oxidedb/launcher.py +1344 -0
  28. oxidedb-0.1.0/oxidedb/metadata/cache.py +320 -0
  29. oxidedb-0.1.0/oxidedb/metadata/publisher.py +252 -0
  30. oxidedb-0.1.0/oxidedb/metadata/service.py +817 -0
  31. oxidedb-0.1.0/oxidedb/proto/client_pb2.py +66 -0
  32. oxidedb-0.1.0/oxidedb/proto/client_pb2_grpc.py +312 -0
  33. oxidedb-0.1.0/oxidedb/proto/groups_pb2.py +58 -0
  34. oxidedb-0.1.0/oxidedb/proto/groups_pb2_grpc.py +212 -0
  35. oxidedb-0.1.0/oxidedb/proto/raft_pb2.py +50 -0
  36. oxidedb-0.1.0/oxidedb/proto/raft_pb2_grpc.py +183 -0
  37. oxidedb-0.1.0/oxidedb/raft/__init__.py +22 -0
  38. oxidedb-0.1.0/oxidedb/raft/client_servicer.py +336 -0
  39. oxidedb-0.1.0/oxidedb/raft/network_client.py +113 -0
  40. oxidedb-0.1.0/oxidedb/raft/node.py +1523 -0
  41. oxidedb-0.1.0/oxidedb/raft/raft_servicer.py +75 -0
  42. oxidedb-0.1.0/oxidedb/raft/recovery_notes.py +143 -0
  43. oxidedb-0.1.0/oxidedb/raft/recovery_runner.py +1136 -0
  44. oxidedb-0.1.0/oxidedb/raft/recovery_view.py +305 -0
  45. oxidedb-0.1.0/oxidedb/raft/shard_server.py +1429 -0
  46. oxidedb-0.1.0/oxidedb/raft/state_machine.py +492 -0
  47. oxidedb-0.1.0/oxidedb/raft/storage.py +402 -0
  48. oxidedb-0.1.0/oxidedb/shard/router.py +101 -0
  49. oxidedb-0.1.0/oxidedb/sql/executor.py +182 -0
  50. oxidedb-0.1.0/oxidedb/sql/parser.py +87 -0
  51. oxidedb-0.1.0/oxidedb/storage/__init__.py +15 -0
  52. oxidedb-0.1.0/oxidedb/storage/engine.py +225 -0
  53. oxidedb-0.1.0/oxidedb/storage/mvcc.py +363 -0
  54. oxidedb-0.1.0/oxidedb/storage/timestamp.py +32 -0
  55. oxidedb-0.1.0/oxidedb/transaction/__init__.py +3 -0
  56. oxidedb-0.1.0/oxidedb/transaction/coordinator.py +445 -0
  57. oxidedb-0.1.0/oxidedb/transaction/local.py +100 -0
  58. oxidedb-0.1.0/oxidedb/transaction/lock_cleaner.py +76 -0
  59. oxidedb-0.1.0/oxidedb/transaction/lock_resolver.py +215 -0
  60. oxidedb-0.1.0/oxidedb/transaction/smart_client.py +473 -0
  61. oxidedb-0.1.0/oxidedb/tso/tso.py +218 -0
  62. oxidedb-0.1.0/proto/client.proto +222 -0
  63. oxidedb-0.1.0/proto/groups.proto +116 -0
  64. oxidedb-0.1.0/proto/raft.proto +55 -0
  65. oxidedb-0.1.0/pyproject.toml +55 -0
  66. oxidedb-0.1.0/requirements.txt +6 -0
  67. oxidedb-0.1.0/tests/_cluster.py +536 -0
  68. oxidedb-0.1.0/tests/_notes.py +64 -0
  69. oxidedb-0.1.0/tests/_ports.py +127 -0
  70. oxidedb-0.1.0/tests/_views.py +46 -0
  71. oxidedb-0.1.0/tests/_wait.py +117 -0
  72. oxidedb-0.1.0/tests/test_apply_results.py +90 -0
  73. oxidedb-0.1.0/tests/test_chaos.py +272 -0
  74. oxidedb-0.1.0/tests/test_cli.py +375 -0
  75. oxidedb-0.1.0/tests/test_client_across_a_move.py +310 -0
  76. oxidedb-0.1.0/tests/test_client_boundary.py +172 -0
  77. oxidedb-0.1.0/tests/test_client_over_processes.py +150 -0
  78. oxidedb-0.1.0/tests/test_client_proto.py +292 -0
  79. oxidedb-0.1.0/tests/test_client_read_index_wire.py +88 -0
  80. oxidedb-0.1.0/tests/test_client_routing.py +1096 -0
  81. oxidedb-0.1.0/tests/test_client_servicer.py +561 -0
  82. oxidedb-0.1.0/tests/test_client_wire_versions.py +65 -0
  83. oxidedb-0.1.0/tests/test_cluster_view.py +39 -0
  84. oxidedb-0.1.0/tests/test_copy_row.py +522 -0
  85. oxidedb-0.1.0/tests/test_cross_shard_transaction.py +449 -0
  86. oxidedb-0.1.0/tests/test_database.py +56 -0
  87. oxidedb-0.1.0/tests/test_durability.py +410 -0
  88. oxidedb-0.1.0/tests/test_ensure_serving.py +479 -0
  89. oxidedb-0.1.0/tests/test_error_codes.py +88 -0
  90. oxidedb-0.1.0/tests/test_group_clients.py +583 -0
  91. oxidedb-0.1.0/tests/test_local_node_client.py +545 -0
  92. oxidedb-0.1.0/tests/test_lock_cleaner.py +158 -0
  93. oxidedb-0.1.0/tests/test_lock_cleaner_wiring.py +98 -0
  94. oxidedb-0.1.0/tests/test_lock_resolution.py +281 -0
  95. oxidedb-0.1.0/tests/test_metadata_service.py +185 -0
  96. oxidedb-0.1.0/tests/test_metadata_wiring.py +373 -0
  97. oxidedb-0.1.0/tests/test_migration_copy.py +318 -0
  98. oxidedb-0.1.0/tests/test_migration_recovery.py +592 -0
  99. oxidedb-0.1.0/tests/test_move_proposal.py +574 -0
  100. oxidedb-0.1.0/tests/test_move_shard_proposal.py +255 -0
  101. oxidedb-0.1.0/tests/test_mvcc.py +56 -0
  102. oxidedb-0.1.0/tests/test_network_raft.py +134 -0
  103. oxidedb-0.1.0/tests/test_network_snapshot.py +205 -0
  104. oxidedb-0.1.0/tests/test_node_view.py +60 -0
  105. oxidedb-0.1.0/tests/test_port_layout.py +65 -0
  106. oxidedb-0.1.0/tests/test_raft_cluster.py +557 -0
  107. oxidedb-0.1.0/tests/test_read_versions.py +122 -0
  108. oxidedb-0.1.0/tests/test_recovery_notes.py +143 -0
  109. oxidedb-0.1.0/tests/test_recovery_over_processes.py +276 -0
  110. oxidedb-0.1.0/tests/test_recovery_view.py +42 -0
  111. oxidedb-0.1.0/tests/test_rejoin_debug.py +75 -0
  112. oxidedb-0.1.0/tests/test_remote_node_client.py +410 -0
  113. oxidedb-0.1.0/tests/test_routing_consistency.py +99 -0
  114. oxidedb-0.1.0/tests/test_scan.py +103 -0
  115. oxidedb-0.1.0/tests/test_serializable.py +215 -0
  116. oxidedb-0.1.0/tests/test_shard_split.py +175 -0
  117. oxidedb-0.1.0/tests/test_sharded_cluster.py +135 -0
  118. oxidedb-0.1.0/tests/test_single_shard_transaction.py +252 -0
  119. oxidedb-0.1.0/tests/test_smart_client.py +222 -0
  120. oxidedb-0.1.0/tests/test_snapshot.py +352 -0
  121. oxidedb-0.1.0/tests/test_snapshot_read.py +295 -0
  122. oxidedb-0.1.0/tests/test_split_freeze.py +262 -0
  123. oxidedb-0.1.0/tests/test_split_group.py +114 -0
  124. oxidedb-0.1.0/tests/test_split_proposal.py +220 -0
  125. oxidedb-0.1.0/tests/test_split_publish.py +269 -0
  126. oxidedb-0.1.0/tests/test_split_recovery.py +306 -0
  127. oxidedb-0.1.0/tests/test_sql.py +76 -0
  128. oxidedb-0.1.0/tests/test_transaction.py +96 -0
  129. oxidedb-0.1.0/tests/test_tso.py +112 -0
@@ -0,0 +1,63 @@
1
+ # Publishes a tagged release, with no long-lived credential: PyPI and TestPyPI
2
+ # identify this repository through the workflow itself (trusted publishing), so
3
+ # there is no token in a secret to leak or to rotate.
4
+ #
5
+ # Nothing is published until both sides are configured:
6
+ # * on TestPyPI and on PyPI, a pending publisher naming this repository, the
7
+ # workflow file `publish.yml` and the environment below (`testpypi`, `pypi`);
8
+ # * in this repository, the two environments of those names - and if the `pypi`
9
+ # environment requires reviewers, the run stops there until someone approves
10
+ # it, which is the second look a release should get.
11
+ # Until then a pushed `v*` tag fails here, loudly and without publishing.
12
+ name: publish
13
+
14
+ on:
15
+ push:
16
+ tags:
17
+ - "v*"
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.14"
27
+ - name: Build the sdist and the wheel
28
+ run: |
29
+ pip install build twine
30
+ python -m build
31
+ twine check dist/*
32
+ - uses: actions/upload-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+
37
+ testpypi:
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ environment: testpypi
41
+ permissions:
42
+ id-token: write
43
+ steps:
44
+ - uses: actions/download-artifact@v4
45
+ with:
46
+ name: dist
47
+ path: dist/
48
+ - uses: pypa/gh-action-pypi-publish@release/v1
49
+ with:
50
+ repository-url: https://test.pypi.org/legacy/
51
+
52
+ pypi:
53
+ needs: testpypi
54
+ runs-on: ubuntu-latest
55
+ environment: pypi
56
+ permissions:
57
+ id-token: write
58
+ steps:
59
+ - uses: actions/download-artifact@v4
60
+ with:
61
+ name: dist
62
+ path: dist/
63
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,45 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ pytest:
10
+ runs-on: ubuntu-latest
11
+ timeout-minutes: 20
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.14"
17
+ cache: pip
18
+ - name: Install
19
+ run: pip install -e ".[test]"
20
+ - name: Run the suite
21
+ run: pytest tests -q
22
+
23
+ package:
24
+ runs-on: ubuntu-latest
25
+ timeout-minutes: 20
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: actions/setup-python@v5
29
+ with:
30
+ python-version: "3.14"
31
+ cache: pip
32
+ - name: Build, and check the metadata the index will read
33
+ run: |
34
+ pip install build twine
35
+ python -m build
36
+ twine check dist/*
37
+ - name: Install the wheel somewhere clean, and import all of it
38
+ run: |
39
+ python -m venv /tmp/wheelcheck
40
+ /tmp/wheelcheck/bin/pip install dist/*.whl
41
+ /tmp/wheelcheck/bin/python -c "import importlib, pkgutil, oxidedb; \
42
+ mods = [m.name for m in pkgutil.walk_packages(oxidedb.__path__, 'oxidedb.')]; \
43
+ [importlib.import_module(m) for m in mods]; print(len(mods), 'submodules')"
44
+ /tmp/wheelcheck/bin/oxidedb --help
45
+ /tmp/wheelcheck/bin/oxidedb-launcher --help
@@ -0,0 +1,25 @@
1
+ # Byte-compiled / cached
2
+ __pycache__/
3
+ *.py[cod]
4
+
5
+ # Build and packaging metadata (regenerated by setup.py)
6
+ *.egg-info/
7
+ build/
8
+ dist/
9
+
10
+ # Test tooling
11
+ .pytest_cache/
12
+ .pytest_tmp/
13
+
14
+ # Local database files from the SQLite engine
15
+ *.sqlite3
16
+ *.sqlite3-wal
17
+ *.sqlite3-shm
18
+
19
+ # Virtual environments
20
+ .venv/
21
+ venv/
22
+
23
+ # Editor and local tooling (not part of the project)
24
+ .idea/
25
+ .workbuddy/
oxidedb-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Xuqing0415
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.