Skip to content

fix(arweave_config_legacy): timeout during high load#961

Closed
humaite wants to merge 1 commit into
masterfrom
humaite/fix-arweave-config-legacy-timeout
Closed

fix(arweave_config_legacy): timeout during high load#961
humaite wants to merge 1 commit into
masterfrom
humaite/fix-arweave-config-legacy-timeout

Conversation

@humaite

@humaite humaite commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

This commit fixes a timeout on arweave_config_legacy when to many processes are trying to communicate with it. Instead of using messaging, a protected ETS table has been created, where the processes can directly fetch the configuration from it.

@cursor

cursor Bot commented Feb 20, 2026

Copy link
Copy Markdown

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 13.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the arweave_config_legacy module to fix timeout issues during high load by replacing synchronous gen_server:call messaging with direct ETS table reads for configuration access. The gen_server is still used for write operations, maintaining consistency while improving read performance.

Changes:

  • Replaced gen_server state record with ETS table for storing configuration
  • Modified read functions (get/0, get/1, has_key/1, get_env/0) to read directly from ETS instead of calling gen_server
  • Updated all handle_call callbacks to use ETS instead of state record
  • Added tests for unsupported message handlers

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
apps/arweave_config/src/arweave_config_legacy.erl Core refactoring from gen_server state to ETS-based storage; updated read/write operations
apps/arweave_config/test/arweave_config_legacy_SUITE.erl Added tests for unsupported handler messages
Comments suppressed due to low confidence (1)

apps/arweave_config/src/arweave_config_legacy.erl:312

  • The error list contains a duplicate entry for 'from'. Line 310 and line 312 both have {from, From}. This creates redundant information in the error log. Either remove one occurrence or replace the second one with a different field.
		{from, From},
		{message, Message},
		{from, From},

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/arweave_config/src/arweave_config_legacy.erl Outdated
Comment thread apps/arweave_config/src/arweave_config_legacy.erl Outdated
Comment thread apps/arweave_config/src/arweave_config_legacy.erl Outdated
Comment thread apps/arweave_config/src/arweave_config_legacy.erl Outdated
Comment thread apps/arweave_config/src/arweave_config_legacy.erl Outdated
Comment thread apps/arweave_config/src/arweave_config_legacy.erl Outdated
@humaite humaite force-pushed the humaite/fix-arweave-config-legacy-timeout branch 3 times, most recently from afb25bc to 7287715 Compare February 20, 2026 13:24
This commit fixes a timeout on arweave_config_legacy when to many
processes are trying to communicate with it. Instead of using messaging,
a protected ETS table has been created, where the processes can directly
fetch the configuration from it.
@humaite humaite closed this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants