Skip to content

Commit 8fd8db0

Browse files
authored
Merge branch 'main' into remove_oehostverify_dependency_from_nonsgx_builds
2 parents a6ede6c + 253518b commit 8fd8db0

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

doc/architecture/threading.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Implementation
1717
Configuration
1818
~~~~~~~~~~~~~
1919

20-
.. warning:: Multiple enclave threads are experimental for now. The ``worker_threads`` configuration option should be set to ``0`` in production environments.
21-
2220
To enable multiple worker threads, the ``worker_threads`` configuration option can be used along with the number of desired threads to ``cchost`` when starting a CCF node.
2321

2422
It is strongly recommended that all CCF nodes run the same number of worker threads.
@@ -32,4 +30,4 @@ It is strongly advised that during the execution of a command the application do
3230
Any inter-command communication must be performed via the key-value store, to ensure that CCF can rollback commands or change the primary as required.
3331

3432
If an application has global state that exists outside the key-value store, CCF offers several concurrency control primitives (via Open Enclave) to protect memory that could be accessed concurrently by multiple threads.
35-
It is recommended that these primitives are used rather than other primitives, such as mutexes, which may result in an OCALL.
33+
It is recommended that these primitives are used rather than other primitives, such as mutexes, which may result in an OCALL.

tests/e2e_logging.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -973,10 +973,20 @@ def id_for(i):
973973
assert r.status_code == http.HTTPStatus.BAD_REQUEST
974974
assert r.body.json()["error"]["code"] == "InvalidInput"
975975

976-
# - Try the first invalid seqno
977-
r = c.get(
978-
f"/app/log/public/historical/range?to_seqno={last_valid_seqno+1}&id={id_a}"
979-
)
976+
# - Try the first invalid seqno.
977+
# !! If implicit TX occurs during this time, fetch last TX id and retry.
978+
attemtps = 5
979+
for _ in range(0, attemtps):
980+
r = c.get(
981+
f"/app/log/public/historical/range?to_seqno={last_valid_seqno+1}&id={id_a}"
982+
)
983+
if r.status_code == http.HTTPStatus.BAD_REQUEST:
984+
break
985+
986+
r = c.get("/node/commit")
987+
assert r.status_code == http.HTTPStatus.OK
988+
last_valid_seqno = TxID.from_str(r.body.json()["transaction_id"]).seqno
989+
980990
assert r.status_code == http.HTTPStatus.BAD_REQUEST
981991
assert r.body.json()["error"]["code"] == "InvalidInput"
982992

0 commit comments

Comments
 (0)