Commit Graph

48 Commits

Author SHA1 Message Date
Jingyu Zhou 2d2a2144f4
Update copyright years to 2013-2026 (#12653)
No functional changes.
2026-01-22 10:49:41 -08:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Lukas Joswiak 890e7610ad Serve no-op configuration database interface when disabled
By continuing to serve the configuration database interface used by
clients even when disabled, clients no longer need to specify a special
`--no-config-db` option when running commands which talk to the
configuration database.
2024-07-08 13:56:03 -07:00
Evan Tschannen ef682d304e fix IKeyValueStore include 2023-06-16 13:28:40 -07:00
Evan Tschannen 3dd86d6c22 move IKeyValueStore.h to the client 2023-05-10 15:41:47 -07:00
FoundationDB CI 86d6106dc1
format source code after switch to clang 15 2022-12-08 17:26:45 +00:00
sfc-gh-tclinkenbeard 728d1294fa Avoid race between ConfigNodeImpl::getChanges and ConfigNodeImpl::commitMutations 2022-12-05 10:10:08 -08:00
Lukas Joswiak 0fddd66492 Add error when reading invalid snapshot version 2022-11-22 11:20:04 -08:00
Lukas Joswiak 795b666e23 Fix a rare configuration database data loss bug
See the comment contained in this commit. This bug could only manifest
under a specific set of circumstances:

1. A coordinator change is started
2. The coordinator change succeeds, but its action of clearing
   `previousCoordinatorsKey` is delayed.
3. A minority of `ConfigNode`s have an old state of the configuration
   database, compared to the majority.
4. A `ConfigNode` in the majority dies and permanently loses data.
5. A long delay occurs on the `PaxosConfigConsumer` when it tries to
   read the latest changes from the `ConfigNode`s.

In the above circumstances, the `ConfigBroadcaster` could incorrectly
send a snapshot of an old state of the configuration database to a
majority of `ConfigNode`s. This would cause new, durable, and
acknowledged commit data to be overwritten.

Note that this bug only affects the configuration database (used for
knob storage). It does not affect the normal keyspace.
2022-11-22 11:20:04 -08:00
sfc-gh-tclinkenbeard c03f60c618 Update rare code probe annotations 2022-11-15 13:21:25 -08:00
sfc-gh-tclinkenbeard 74212eeacf Encapsulate CounterCollection 2022-10-25 10:17:15 -07:00
sfc-gh-tclinkenbeard 985958c260 Add rare code probe decoration 2022-09-25 15:28:32 -07:00
Lukas Joswiak 8c50f98c00 Update type of coordinators hash
This fixes some serialization issues due to `BinaryReader` not being
able to deserialize types of size_t.
2022-09-13 16:53:54 -07:00
Lukas Joswiak 424bb87f3e Apply feedback 2022-09-13 16:53:54 -07:00
Lukas Joswiak 809d77c2ab Fix issue where annotations were not being serialized 2022-09-13 16:53:54 -07:00
Lukas Joswiak 8d237ba493 Fix various correctness and timeout issues
Contains the following fixes:

* When handling the special case rollforward where nodes can be rolled
  forward even if a majority are at version 0, we don't want to reset
  the live version of the node being rolled forward. This is because a
  quorum of nodes at version 0 can continue handing out and incrementing
  their live version, and if they are rolled forward there is the
  potential for them to go back in time in regard to their live version.
  So in this one special case, they should maintain their existing live
  version.
* Fixes some unseed issues due to fields not being initialized properly.
* Temporarily disables a coordinator restart in the recovery path (in
  the coordinated state) due to it causing a timeout. This needs more
  investigation in the future.
2022-09-13 16:53:54 -07:00
Lukas Joswiak 249ff2b2fd Fix configuration database unit tests 2022-09-13 16:53:54 -07:00
Lukas Joswiak 74ac617a34 Add support for changing coordinators to the configuration database
Configuration database data lives on the coordinators. When a change
coordinators command is issued, the data must be sent to the new
coordinators to keep the database consistent.
2022-09-13 16:53:54 -07:00
Markus Pilman 1de37afd52
Make TEST macros C++ only (#7558)
* proof of concept

* use code-probe instead of test

* code probe working on gcc

* code probe implemented

* renamed TestProbe to CodeProbe

* fixed refactoring typo

* support filtered output

* print probes at end of simulation

* fix missed probes print

* fix deduplication

* Fix refactoring issues

* revert bad refactor

* make sure file paths are relative

* fix more wrong refactor changes
2022-07-19 13:15:51 -07:00
sfc-gh-tclinkenbeard a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
Lukas Joswiak 582ba5d519 Fix issue with stuck config nodes
In rare circumstances where the cluster controller dies / moves to a new
machine, sometimes only a minority of `ConfigNode`s received messages
telling them they were registered. When the `ConfigNode`s attempt to
register with the new broadcaster (on the new cluster controller), the
knob system would get stuck because only a minority would be registered.
Part of this change allows registration of unregistered `ConfigNode`s if
there is no path to a majority of registered nodes.
2022-03-15 11:42:58 -07:00
Lukas Joswiak 803fc86e61 Fix compaction issue when rolling nodes back 2022-02-22 16:21:33 -08:00
Lukas Joswiak ce67d1937f Add explanation of out-or-order messages from broadcaster 2022-02-09 13:43:33 -08:00
Lukas Joswiak c86712b4c0 Move single interface serve functions to testing interface 2022-02-09 13:43:33 -08:00
Lukas Joswiak d5a562e6b8 Fix dynamic knobs correctness issues 2022-02-09 13:43:32 -08:00
Lukas Joswiak 30b525a607 Add assertions to check rollback 2021-10-25 12:03:22 -07:00
Lukas Joswiak c96f560cbe Verify rollback of a single version in simulation, other small fixes 2021-10-25 12:03:22 -07:00
Lukas Joswiak 57c2cf4a24 Retry messages to well known endpoints, add notes for future work 2021-10-25 12:03:22 -07:00
Lukas Joswiak 92998fd20b Merge rollback message into rollforward message 2021-10-25 12:03:22 -07:00
Lukas Joswiak 7357d7714c Retry with well known endpoints, move last committed check to consumer 2021-10-25 12:03:22 -07:00
Lukas Joswiak 48dc91dd7f Add rollback and rollforward logic to ConfigBroadcaster 2021-10-25 12:03:22 -07:00
Lukas Joswiak 77ef8a737d Update fdbserver/ConfigNode.actor.cpp
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2021-09-21 14:31:41 -07:00
Lukas Joswiak 8e31682737 Update fdbserver/ConfigNode.actor.cpp
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2021-09-21 14:31:41 -07:00
Lukas Joswiak 83d6c319fb Cleanup, refactor, add unit test 2021-09-21 14:31:41 -07:00
Lukas Joswiak 782f13c25e Remove WAL mutations during rollback 2021-09-21 14:31:41 -07:00
Lukas Joswiak 9c561f49d9 Overwrite existing mutations with rollforward mutations, use existing annotations 2021-09-21 14:31:41 -07:00
Lukas Joswiak b3a633b7d4 Update fdbserver/ConfigNode.actor.cpp
Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
2021-09-21 14:31:41 -07:00
Lukas Joswiak a79aea108c Add rollforward capability to ConfigNode 2021-09-21 14:31:41 -07:00
Lukas Joswiak 919d2566e0 Add rollback capability to ConfigNode 2021-09-21 14:31:41 -07:00
Lukas Joswiak 96bf4268eb Implement IClosable in OnDemandStore 2021-09-13 12:28:17 -07:00
sfc-gh-tclinkenbeard 29d83291a1 Add CommitUnknownResult metric for ConfigIncrement workload 2021-08-27 00:44:12 -07:00
sfc-gh-tclinkenbeard 28f3481656 Remove unnecessary debugging trace events 2021-08-26 17:13:39 -07:00
sfc-gh-tclinkenbeard 28daab9f5c Use ActorCollection instead of std::vector<Future<Void>> in *Quorum classes, to listen for errors 2021-08-26 16:18:19 -07:00
sfc-gh-tclinkenbeard 79ba9c4e3a Add GetGenerationQuorum to get generation from a quorum of config nodes 2021-08-09 10:04:35 -07:00
sfc-gh-tclinkenbeard cd8a82b1b8 Rename GetGenerationRequests metric 2021-08-09 10:04:35 -07:00
sfc-gh-tclinkenbeard 7deb339a0c Added ConfigIncrement.toml test 2021-08-09 10:04:35 -07:00
sfc-gh-tclinkenbeard b15daf1886 Added PImpl class
This class propogates the constness of methods to their pimpl
implementations
2021-08-09 10:04:34 -07:00
sfc-gh-tclinkenbeard b3e2b06553 Remove multiple implementations of ConfigNode 2021-07-18 18:25:06 -07:00