Attempting to reduce max source file size to a more reasonable 4000 lines, to start with.
These methods are mostly DatabaseContext member functions so this seems like a no-brainer.
The rationale for this is mostly self-evident but rdar://160903696 has some additional notes.
Testing in progress:
20250919-205905-gglass-1364d752d341f4e4 compressed=True data_size=41575837 duration=6130944 ended=100000 fail=1 fail_fast=10 max_runs=100000 pass=99999 priority=100 remaining=0 runtime=0:57:39 sanity=False started=100000 stopped=20250919-215644 submitted=20250919-205905 timeout=5400 username=gglass
The one failure was this: fdbserver -r simulation -s 424077837 -b on -f tests/slow/BackupCorrectnessPartitioned.toml
reproduces on main without this PR. Filed rdar://160972142 for that.
* move initial batch of DatabaseContext methods to DatabaseContext.actor.cpp
* another batch of functions NativeAPI.actor.cpp to DatabaseContext.actor.cpp
* Split out printable() methods to a separate file, and ongoing migration of DatabaseContext methods to its own file
* add Printable.cpp, methods split out from NativeAPI
* add a header to eliminate ugly random prototypes in source files for getSourceVersion
* move more DatabaseContext methods
* move more code from NativeAPI.actor.cpp to DatabaseContext.actor.cpp
* formatting
* Remove code which has been behind #if 0 for > 5 years
* Separate open() from read() failures, and avoid potentially leaking fds
* Minor refactor to remove some distracting #ifdefs
* Add comment
* Add some META-FIXME comments about suspicious dated FIXME comments.
Also add one long straight up FIXME comment about a commented out code block
that looks suspicious. Discuss other ways that the code in question could be structured.
* Add a link to a doc page describing DEBUG_DETERMINISM
* Format updates
* Save 2 lines of code
* Remove useless comment
* Remove long-commented out code; remove useless comments; request a comment
* Remove obvious comments; request comments about non-obvious stuff
* Request comments explaining protocols
* Comment updates
* Rename tlog-spilling.md.html to tlog-spilling.md so that github renders it
* Remove broken link
* Revert "Remove broken link"
This reverts commit 6f90eff6ce.
* Revert "Rename tlog-spilling.md.html to tlog-spilling.md so that github renders it"
This reverts commit b57a922489.
* Remove broken link and unnecessary assertion about required background; add an explanation for why the user is reading raw markdown
* Update provisional comment, and remove long-commented out code which we think is not necessary.
* Add one small explanatory comment
---------
Co-authored-by: Gideon Glass <gglass_glass@apple.com>
Remove the use of relative paths. A header at foo/bar.h could be included by
files under foo/ with "bar.h", but would be included everywhere else as
"foo/bar.h". Adjust so that every include references such a header with the
latter form.
Signed-off-by: Robert Escriva <rescriva@dropbox.com>