Commit Graph

68 Commits

Author SHA1 Message Date
Trevor Clinkenbeard fe42e6fd79 Enforce clang-tidy braces around long statements 2026-06-22 23:01:11 -07:00
Trevor Clinkenbeard e7737f7bf6 Enforce new rules 2026-03-14 02:25:26 +00:00
Trevor Clinkenbeard 652f85de07
Add and enforce more `readability-*` `clang-tidy` rules (#12765)
* Add and enforce more readability-* clang-tidy rules

* Revert readability-else-after-return changes
2026-03-12 22:30:38 -07:00
Trevor Clinkenbeard 0b60487dcf Enforce more clang-tidy warnings 2026-02-27 19:19:29 +00:00
Jingyu Zhou 2d2a2144f4
Update copyright years to 2013-2026 (#12653)
No functional changes.
2026-01-22 10:49:41 -08:00
Johannes Scheuermann 5f6509faeb
Only delay the restart of fdbserver if the process exited with an exit code other than 0 (#11802) 2024-12-01 22:16:40 -08:00
Sepeth f84a3987a7
Fix fdbmonitor build issues on macOS (#11561)
Without this change, the build fails with multiple identifiers not found, such
as `gettimeofday`, `sigprocmask`, `kqueue` and some more related ones.
`watch_conf_dir` and  `watch_conf_file` were also missing in the
`fdbmonitor.h`.
2024-08-09 15:23:48 -07:00
Syed Paymaan Raza 1b9c342a4b
[fdbmonitor] Refactor and add CTest support (#11547)
* [fdbmonitor] Refactor and add CTest support
2024-08-02 15:49:15 -07:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Jingyu Zhou 0b38c1b4ce Merge branch 'main' of https://github.com/apple/foundationdb into pr/dwagin/8381 2024-05-03 10:09:37 -07:00
Jingyu Zhou a083d81737 Fix MacOS compiling errors 2023-10-23 12:32:05 -07:00
Alex Miller 249588146b Make fdbmonitor understand $PID, so that --parentpid is usable on fdbserver.
Previously, --parentpid was only supported on windows.  #1496 extended that
to other platforms for a CI usecase.  On Linux, `prctl(PR_SET_PDEATHSIG,
SIGHUP)` should arrange for the subsequently exec()'d fdbserver to get a SIGHUP
and die if fdbmonitor is killed.  In local testing, I've confirmed that this
works, but I've also seen evidence that on some hosts/clusters it appears to
possibly not work.

Therefore, having --parentpid as a backup for the cases where it seems like
hosts might not properly support PR_SET_PDEATHSIG is nice.
2023-03-28 10:05:00 -07:00
Dmitry Wagin 713fce3657 fdbmonitor: track parent process death for FreeBSD 2022-10-03 00:44:55 +03:00
Markus Pilman 03d913a1de Flow compiling 2022-06-27 17:05:55 -06:00
Yi Wu 994b8c92f8
Add option to limit resident memory and remove default memory limit (#6719)
Changing `memory` option to limit resident memory instead of virtual memory, in config file and fdbserver/fdbbackup/fdbcli command-line argument. Since `rlimit` doesn't support limiting virtual memory, the current implementation have both of fdbmonitor and the fdbserver/fdbbackup process checking process RSS periodically and kill and restart the process if the limit is exceeded.

Adding a new `memory_vsize` option to limit virtual memory, if backward-compatible behavior is desired.

closes #6671, closes #6672
2022-04-06 20:06:24 -07:00
sfc-gh-tclinkenbeard a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
sfc-gh-tclinkenbeard 5b8f4d9be1 Move SimpleIni.h to fdbclient 2022-02-07 13:31:04 -08:00
A.J. Beamon f29f487823
Unify flags (#25)
* Unify flags implementation and change help text in backup.actor.cpp
Description

Testing

* Keep LOG_GROUP unchanged

Description

Testing

* Transfer the hyphens to underscores for internal options and user's input, EXCEPT leading hyphens

Description

Testing

* Use a deep copy of the user's input flag to do the match

Description

Testing

* Convert the _ to - in Option arrays of backup.actor.cpp

Description

Testing

* Transter _ to - for files:
        TLSConfig.actor.h, fdbcli.actor.cpp, fdbserver.actor.cpp, FileConverter.h, FileConverter.cpp

Description

Testing

* Change another way to unify flag: using SO_O_ICASE_HYPHEN_AND_UNDERSCORE to determine whether we do the conversion in function IsEqual

Description

Testing

* Change the config command's name from SO_O_ICASE_HYPHEN_AND_UNDERSCORE to SO_O_HYPHEN_TO_UNDERSCORE

Description

Testing

* Update the comment for the SO_O_HYPHEN_TO_UNDERSCORE

Description

Testing

* Fix left underscore in SOption arrays

Description

Testing

* Convert _ to - in several files for commands

Description

Testing

* Make the FDBService and fdbmonitor backward compatible

Description

Testing

* Fix bugs about pointers

Description

Testing

* Check underscore and hyphen at the same time for --knob_, --localily_ and --test_
And fix bugs in fdbmonitor and FDBService
Description

Testing

* Simplify the function in fdbmonitor and FDBService about retrieving arguments.
And fix some documents in masterserver.actor.cpp

Description

Testing

* Convert _ to - for knob in the setKnob functions

Description

Testing

* Convert - to _ in the setKnob functions

Description
Since key in the knob related maps only contain _

Testing

* Rename varialbe name in the fdbmonitor and FDBService for clarification

Description

Testing

Co-authored-by: Chang Liu <chang.liu@snowflake.com>
2021-12-14 08:44:39 -08:00
sfc-gh-tclinkenbeard 90ced244eb Fix -Wunused-but-set-variable warnings 2021-12-01 18:15:53 -08:00
A.J. Beamon 1a5efa004a Include the errno details if execv fails in fdbmonitor 2021-09-28 10:02:45 -07:00
sfc-gh-tclinkenbeard b9a22a61ef Fix many -Wreorder-ctor warnings 2021-07-23 17:33:18 -07:00
A.J. Beamon 5832e61c0c Make fdbmonitor IDs unique per section rather than globally unique 2021-07-13 16:13:48 -04:00
A.J. Beamon c49a095677 Remove some misleading wording 2021-07-13 09:15:54 -04:00
Daniel Smith 5529c96e51 Clean up a few memory leaks 2021-06-25 10:38:54 -04:00
sfc-gh-tclinkenbeard f28ac955c3 Remove unnecessary temporary objects while growing objects of type std::vector<std::pair<A, B>> 2021-05-10 16:32:50 -07:00
FDB Formatster df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
sfc-gh-tclinkenbeard 9a7b6eb51c Replace NULL with nullptr in fdbmonitor 2020-09-20 11:33:17 -07:00
A.J. Beamon d128252e90 Merge release-6.3 into master 2020-05-22 09:25:32 -07:00
Alex Miller 78d644f673
Merge branch 'master' into bugfixes/cmake-includes 2020-05-04 02:11:46 -07:00
Dave Cottlehuber 28e58c672a fdbmonitor: ifdef config path location 2020-04-30 20:11:43 +00:00
Dave Cottlehuber b2eb93f5f4 fdbmonitor: define O_EVTONLY for FreeBSD 2020-04-30 20:11:43 +00:00
Dave Cottlehuber 5064cc776b fdbmonitor: update headers & libraries 2020-04-30 20:11:43 +00:00
Markus Pilman e4611e8ae4 fix versions.h stupidity 2020-04-06 10:28:55 -07:00
Markus Pilman 8b5780c36c don't include source and binary dir
This forces users to use include paths from the sources root.

So `#include "Arena.h"` won't work anymore, only
`#include "flow/Arena.h"` will.
2020-04-06 10:13:49 -07:00
Austin Seipp 0b263fd856 fdbmonitor: fix some print/scan format warnings
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-06 13:35:29 -07:00
Andrew Noyes 6207d724f8 Fix all -Wunused-variable warnings 2019-04-15 18:13:00 -07:00
Stephen Atherton 382a7bdc5f Changed behavior regarding ~ and ~user paths to treat them as unresolvable symbolic links. 2019-03-22 16:21:12 -07:00
Stephen Atherton 524a666290 Added back previous handling of ~ in paths, with the improvement that it only treats ~ as special if it is the first character. 2019-03-22 11:44:46 -07:00
Stephen Atherton 6c42e42334 Fix compiler complaint about ignored return codes being ignored. Added commented call to testPathOps() for convenience. 2019-03-21 18:05:30 -07:00
Stephen Atherton a6b598f236 Missing include. 2019-03-21 17:51:00 -07:00
Stephen Atherton c6d96498ca parentDirectory() is now based on popPath(). Bug fix, abspath() would prepend current working directory even when not resolving symlinks. Added more unit tests. Ported path operation unit tests to fdbmonitor() since the path manipulation function implementations are significantly different. Clarified some comments. The flow project version of abspath() does not allow resolveLinks to be false, for now, because behavior of this on Windows is not well thought out or tested. 2019-03-21 16:56:36 -07:00
Stephen Atherton 644a88e8b4 Updated fdbmonitor to use modified/minimal implementations of new abspath() and parentDirectory() implementations from flow. 2019-03-20 23:18:30 -07:00
Stephen Atherton 2efb6f4c0d Added cleanPath() which puts a path in a canonical form without .., ., or duplicate separators without using the filesystem or resolving symbolic links. absPath() redefined to use cleanPath() so it will return the same result for a path without symbolic links regardless of whether or not the path actually exists. Redefined parentDirectory() to use absPath() and error on certain inputs. Added comments describing behavior of these functions, and added a unit test which verbosely tests many inputs to them. 2019-03-15 23:54:33 -07:00
A.J. Beamon 809861ee88 Merge branch 'master' into fix-parent-directory
# Conflicts:
#	flow/Platform.cpp
2019-03-15 10:51:12 -07:00
mpilman 6da5971e79 Guard all versions.h to not break old WIN32 build 2019-02-08 16:06:00 -08:00
mpilman 7a858b902d Most of FDB compiling on Windows with cmake 2019-02-07 15:37:04 -08:00
Bhaskar Muppana 448e654a03 Fix Make build. 2019-01-03 13:14:02 -08:00
mpilman a31df1b0a6 Addressed comments from pull requests
- Moved some larger sections in CMakeLists.txt into separate files
- Fixed an include issue on OS X
- Fixed boost version
- Use PROJECT_VERSION by default instead of using versions.target
2019-01-02 13:32:26 -08:00
Evan Tschannen 4e54690005 Merge branch 'release-6.0'
# Conflicts:
#	fdbserver/DataDistribution.actor.cpp
#	fdbserver/MoveKeys.actor.cpp
2018-11-12 20:26:58 -08:00
Stephen Atherton 3bd66217c6 Bug fix, kill_process() modifies the id <-> pid maps so to kill all ids one by one the loop iterator must be advanced before the kill. 2018-11-08 16:21:50 -08:00