Skip to content

Conversation

pedromiguelmiranda
Copy link
Contributor

  • Add a public entry point to nimbus beacon node by changing 'handleStartUpCmd'
    scope to public.

  • protect database file lock concurrent creation/deletion

Copy link

github-actions bot commented Jul 15, 2025

Unit Test Results

0 files   -        15  0 suites   - 2 650   0s ⏱️ - 1h 20m 0s
0 tests  -   6 634  0 ✔️  -   6 076  0 💤  - 558  0 ±0 
0 runs   - 45 676  0 ✔️  - 44 894  0 💤  - 782  0 ±0 

Results for commit cc19fd3. ± Comparison against base commit ea042dc.

♻️ This comment has been updated with latest results.

writeFile filename, $os.getCurrentProcessId()
gPidFile = filename
addExitProc proc {.noconv.} = discard io2.removeFile(gPidFile)
if shouldCreatePidFile.load():
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this compareandswap(true)? this way, the variable doesn't have to be public and it's guaranteed to run once only

also, this should be moved to nimbus_binary_common if it's going to be shared between binaries

Copy link
Contributor Author

Choose a reason for hiding this comment

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

needs to be public, otherwise a different thread can not read/write.

The purpose of this change is to avoid the the error triggered by addExitProc on a threaded environment, when it tries to delete something that does not exist anymore.

Agree on moving this to nimbus_binary_common

pmmiranda added 2 commits July 23, 2025 13:51
- Add a public entry point to nimbus beacon.
- protect database file lock concurrent creation/deletion
@etan-status etan-status force-pushed the unstable branch 3 times, most recently from a0510ce to aa88cd4 Compare July 25, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants