tracing-disable-must-be-zero-cpu#40
Merged
oskarszoon merged 3 commits intoOct 23, 2025
Merged
Conversation
rid3thespiral
added a commit
to rid3thespiral/teranode
that referenced
this pull request
Oct 23, 2025
…in#40) Implement comprehensive chaos testing for Kafka broker failures to validate system resilience and recovery capabilities. ## Changes ### New Test Implementation - **test/chaos/scenario_02_kafka_broker_failure_test.go**: Complete chaos test for Kafka broker failure scenarios with 9 test phases: 1. Baseline performance validation 2. Latency injection (3s via toxiproxy) 3. Sync producer behavior under latency 4. Async producer behavior under latency 5. Complete broker failure simulation (100% connection drops) 6. Producer failure handling validation 7. Consumer failure handling validation 8. System recovery verification 9. Message consistency validation ### Test Automation - **test/chaos/run_scenario_02.sh**: Automated test runner with: - Pre-flight checks for Kafka and toxiproxy services - Auto-start docker compose if needed - Service connectivity verification - Automatic cleanup after test completion - Colored output for better readability ### Infrastructure Fixes - **compose/docker-compose-ss.yml**: - Pin PostgreSQL to version 16 (prevent breaking upgrades) - Expose Kafka ports 9092 and 9093 to host - Update Kafka advertise listener to localhost for external access - Fixes PostgreSQL restart loop and Kafka connectivity issues ### Documentation - **test/chaos/README.md**: Updated with: - Complete Scenario 2 documentation - Test phases and expected results - Usage instructions with helper scripts - Updated test duration estimates - Marked Scenario 2 as implemented ## Test Results All tests passing (132.26 seconds): - ✅ Baseline Performance - ✅ Latency Injection - ✅ Producer With Latency (sync and async) - ✅ Broker Failure Injection - ✅ Producer/Consumer Under Failure - ✅ Recovery Verification - ✅ Message Consistency ## Testing ```bash # Run Scenario 2 only ./test/chaos/run_scenario_02.sh # Run all chaos tests go test -v ./test/chaos/... ``` ## Prerequisites - Docker compose with toxiproxy-kafka running - Kafka accessible on localhost:9092 (direct) and localhost:19092 (via toxiproxy) - Toxiproxy API on localhost:8475 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
|
/claude-review |
ordishs
approved these changes
Oct 23, 2025
Contributor
|
🤖 Claude Code Review Status: Complete Current Review: This PR implements a global flag-based optimization to eliminate tracing overhead when tracing is disabled. The implementation looks solid overall with good test coverage. Key Changes:
No critical issues found. The implementation follows proper patterns:
The optimization should effectively reduce CPU overhead when tracing is disabled by avoiding OpenTelemetry lookups and allocations. |
|
oskarszoon
approved these changes
Oct 23, 2025
torrejonv
pushed a commit
to torrejonv/teranode
that referenced
this pull request
Oct 26, 2025
Co-authored-by: oskarszoon <1449115+oskarszoon@users.noreply.github.com>
4 tasks
oskarszoon
added a commit
that referenced
this pull request
May 11, 2026
…he (#842) Pins github.com/bitcoin-sv/bdk/module/gobdk to a pseudo-version of the hot-fix on top of v1.2.3 (bitcoin-sv/bdk PR #40) that adds a per-instance CachingScriptChecker overriding CheckSig to short-circuit identical signature verifications within one EvalScript run. Without the hot-fix the validator stalls for hours on testnet block 1,451,505 / tx 7bc9a3408dd0c87b835c887a0bce22c20788fc3c4b953929d4367656d80acab5, whose 490 KB locking script performs 245,001 identical ECDSA verifications. The cgo entry point is uninterruptible from Go so it presents to operators as a hang in _Cfunc_ScriptEngine_VerifyScript. With the hot-fix the verifier completes in ~70 s. Do not bump gobdk to v1.2.4 (or later) until bitcoin-sv/bdk PR #41 — the master/v1.2.4 port of the same hot-fix — has been merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.