Commit Graph

498 Commits

Author SHA1 Message Date
Meng Xu 1596e2e4a5 DD:TCMachine:Use processID as machineID if zoneID is unset 2019-09-13 13:43:41 -07:00
Meng Xu 3ad7e3adb3 DD:DD_VALIDATE_LOCALITY:Guard the checking of locality validity 2019-09-13 13:19:35 -07:00
Meng Xu 90d6a27a0d DD:IsValidLocality:Consider configured replica policy 2019-09-13 12:04:49 -07:00
Meng Xu 52f6297b52 DD:Introduce isValidLocality
A server or machine has a valid locality only if it sets correct
locality entries.

Build teams should only use the valid locality servers or machines
2019-09-13 11:30:26 -07:00
Evan Tschannen b495cc697b Merge branch 'release-6.2'
# Conflicts:
#	CMakeLists.txt
#	documentation/sphinx/source/release-notes.rst
#	versions.target
2019-09-13 09:25:08 -07:00
Evan Tschannen cc41f3e2fc fix: an unhealthy server with a low number of teams could cause data distribution to build every possible teams 2019-09-12 14:18:10 -07:00
Meng Xu 2081302a89 DD:GetTeam:Add trace event GetTeamReturnEmpty
Log BestTeamStuck reason when we have healthy teams
but they do not have healthy free space
2019-09-11 14:48:39 -07:00
Meng Xu 3c4dc1003d DD:clang-format the PR 2019-09-11 11:16:29 -07:00
Meng Xu a83afa5f64 DD:BgDDValleyFiller:Do not move shard to a team with no healthy space 2019-09-11 11:15:00 -07:00
Meng Xu 8e47a05326 DD:TeamInfo:Add HasHealthyFreeSpace field 2019-09-09 18:42:18 -07:00
Meng Xu 259ca36aa2 DD:Random pick from valid teams 2019-09-09 18:28:39 -07:00
Meng Xu 0b785e5c1c DD:getTeam may fail to get a team when it can
Due to randomness, when unhealthy teams are majority while there still
exists healthy teams, getTeam function may be unlucky to find
any feasible (ok) team, which leads to BestTeamStuck situation.

This commit increases the tries from 10 to 20.

A long-term solution may first find all feasible teams and choose a random
one from them. Since This can affect the statistics of which team is picked.
So it is not included in this commit.

Non-functional change: This commit removes unneeded printf introduced by
fast restore PR 1404.
2019-09-07 20:08:58 -07:00
Jon Fu def1294aab moved wait statement to avoid context switch between check and execution 2019-09-04 12:42:27 -07:00
Meng Xu 8f9ba3bc09 StorageEngineSwitch:Remove unused code 2019-09-03 17:18:56 -07:00
Jon Fu dbc993a138 change use of reference to raw ptr to avoid unwanted delay of destructors 2019-09-03 16:27:14 -07:00
Meng Xu bd80a67d46 Merge branch 'master' into mengxu/storage-engine-switch-PR-v2 2019-09-03 14:11:33 -07:00
sramamoorthy 5d87443323 improved error msgs for snapshot cmd 2019-08-27 16:43:52 -07:00
Jon Fu 202900bd79 adjusted priority of relocateShard requests if team contains failed server 2019-08-27 14:39:44 -07:00
Jon Fu 93079c6657 always attempt to send RelocateShard requests if team has a failed server 2019-08-27 14:39:44 -07:00
Jon Fu 3666c0c776 added more trace lines and added timeout to safety check in test workload 2019-08-27 14:39:44 -07:00
Jon Fu a757e66327 Revert "restart team builder when storage server fails"
This reverts commit d661efacc215c4db7c7c338e16591463267e80d7.
2019-08-27 14:39:44 -07:00
Jon Fu d61bfe3e96 restart team builder when storage server fails 2019-08-27 14:39:44 -07:00
Jon Fu 04d514c483 added a wait to check for master proxies changed and put in a few more trace events 2019-08-27 14:39:44 -07:00
Jon Fu 00c2025d4b fixed removeKeys impl, adjusted test workload, and introduced extra safety checks to NativeAPI and proxy 2019-08-27 14:39:44 -07:00
Jon Fu a07cf5d038 addressed code review comments 2019-08-27 14:39:44 -07:00
Jon Fu 080fbc63dc updated keyServers removal to be multi-transactional in order to avoid hitting transaction timeout 2019-08-27 14:39:43 -07:00
Jon Fu ddfcbae929 added exclusion logic to account for entire machines when no port is specified 2019-08-27 14:39:43 -07:00
Jon Fu 5a877d6b14 added safety check on client to prevent removing all servers from a team 2019-08-27 14:39:43 -07:00
Jon Fu 66bba51988 Implemented direct removal of failed storage server from system keyspace 2019-08-27 14:39:43 -07:00
Jon Fu c908c6c1db added command to fdbcli and changes to SystemData and ManagementAPI 2019-08-27 14:39:43 -07:00
Meng Xu cc6dccf6a4 StorageEngineSwitch:Remove existOtherHealthyTeams actor
We no longer needs this actor because the removeWrongStoreType actor
will remove a storage server only when the DD is healthy.
2019-08-22 13:21:03 -07:00
Meng Xu a377261740 StorageEngineSwitch:Remove questions in comments 2019-08-22 11:49:39 -07:00
Meng Xu 5ddf2b16be StorageEngineSwitch:Wait until DD is healthy before remove a wrong storeType server 2019-08-22 11:47:12 -07:00
Meng Xu 9bb646db30 StorageEngineSwitch:Resolve review comments
1) Rely on the fact that the wrong storeType server will signal removeWrongStoreType
back to re-check the next server with wrong storeType.

Do not rely on timeout as a safeguard to trigger removeWrongStoreType actor.

Note:
removeWrongStoreType actor will not check if there is a storage server with wrong
store type, unless the DD is healthy.
Removing a storage server while DD is not healthy may trigger weird failure cases and
also cause negative impact on cluster performance.

2) Remove try catch in KeyValueStoreTypeTracker
Let the caller handle exceptions, e.g., actor cancelling exception

3) Cleanup debug message and clang-format code
2019-08-22 09:59:47 -07:00
Meng Xu 39680fa515 StorageEngineSwitch:Clean up unnecessary trace
And do not trigger storage recruitment unnecessarily.
2019-08-19 14:11:57 -07:00
Meng Xu b448f92d61 StorageEngineSwitch:Remove unnecessary code and format code
Uncessary code include debug code and the unnecessary calling of
the removeWrongStoreType actor;

Format the changes with clang-format as well.
2019-08-16 16:53:38 -07:00
Meng Xu 0648388b25 StorageEngineSwitch:Prefer remove SS without causing zero healthy teams 2019-08-16 16:34:23 -07:00
Meng Xu 85ba904e2c StorageEngineSwitch:Stop removeWrongStoreType actor if no SS has wrong storeType 2019-08-16 16:11:28 -07:00
Meng Xu 2859dc57a8 StorageEngineSwitch:Only allow one pending recruitment on a worker 2019-08-16 15:04:11 -07:00
Evan Tschannen 297b65236f added additional trace events to warn when different parts of shard relocations take more than 10 minutes 2019-08-16 14:56:58 -07:00
Meng Xu 2a7b208df2 StorageEngineSwitch:Call removeWrongStoreType only when necessary
If a cluster does not change its storeType for a while, we do not need to
call removeWrongStoreType actor periodically.

This solution is the same as how badTeamRemover actor is handled.
2019-08-16 10:48:53 -07:00
Meng Xu 86b51624a4 StorageEngineSwitch:Check next SS to remove once old one is removed 2019-08-16 10:43:20 -07:00
Meng Xu 0ad68fb89f StorageEngineSwitch:Timeout if to-be-removed SS fails
In case the wrong storeType SS picked to be removed fails before
it triggers the next round of checking if a SS has wrong store type,
we should time out and invoke the checking.

Otherwise, the removeWrongStoreType actor will never be running again.
2019-08-15 17:03:53 -07:00
Meng Xu 980fa39c23 StorageEngineSwitch:Speed up removing wrong storeType server in simulation 2019-08-15 15:55:11 -07:00
Meng Xu 794009b242 StorageEngineSwitch:Limit SS num per proc
Multiple storage server recruitment requests may be buffered in
cluster controller, hoping that in the near future cluster controller
will find an available worker for the request.

It is possible that many outstanding storage recruitment requests are
fullfilled by the cluster controller in a very short time interval.

When DD recruit those requests, it blindly initiaze a storage server
on the recruited worker and let the storage server tracker remove
storage servers on the same process (ip, port).

This is problematic because multiple SS on the same process can push
the process OOM. Even in simulation, initializing too many SS causes
simulator OOM.

This commit limits the max number of SS on a process to be 2.

We cannot enforce the number of SS on a process to be 1 right now,
because current simulation tests may change configuration in a situation that
without allowing more than 1 SS on a process will fail the tests.
2019-08-15 14:08:43 -07:00
Meng Xu 4a321f983a StorageEngineSwitch:Periodic check if a server has wrong storeType
If DD checks storage server's storeType before some storage servers are
fully available, DD may miss those storage servers to remove.

To ensure no storage servers with wrong storeType is missed, SS marks the
doRemoveWrongStoreType to be true.

To avoid removing multiple servers at the same time, the actor waits for a
configurable delay before checking and removing a storage server.
2019-08-13 17:35:18 -07:00
Meng Xu 3bc1f38b43 StorageServerTracker:Do not recruit until a SS is shutdown
When a storage server is detected by the storageServerFailureTracker as failed,
we should not immediately restart recruiting new storage server on the same address,
which will cause OOM error on the address.

The existing logic removeServer() function will remove the failed server from
server_info and trigger recruiting new storage servers.
2019-08-13 16:10:20 -07:00
Meng Xu 24047defff StorageEngineSwitch:Remove and rename server variables
Remove unused toRemove variable from server_info,
Rename wrongStoreTypeRemoved to wrongStoreTypeToRemove.
2019-08-13 15:44:48 -07:00
Meng Xu e6284684f0 StorageEngineSwitch:Always remove wrong storeType SS
In the old logic of switching storage engines, it marks a storage server
with wrong store type as undesired even though this can lead to no healthy team.

In the first version of the new storage engine switch, we mimic the same logic
of the old version.
2019-08-13 14:59:46 -07:00
Meng Xu b216cd2516 StorageEngineSwitch:Use AsyncVar to signal server to remove
Trigger does not have an effect if the receiver is not waiting on the trigger.
To ensure the wrong store type server that is selected to be removed is removed,
we should use an AysncVar<bool> to trigger the storage tracker.
2019-08-12 18:14:05 -07:00
Meng Xu a588710376 StorageEngineSwitch:Graceful switch
When fdbcli change storeType for storage engines,
we switch the store type of storage servers one by one gracefully.
This avoids recruiting multiple storage servers on the same process,
which can cause OOM error.
2019-08-12 17:37:52 -07:00
Evan Tschannen ba54508c47 code cleanup 2019-08-06 16:30:30 -07:00
Evan Tschannen 5dc4c80d44 fix: the machineAttrition workload did not ensure that healthyZone was always cleared
fix: an assert could trigger spuriously
2019-08-05 15:00:17 -07:00
Evan Tschannen 7d7aa27c2d
Merge pull request #1814 from dongxinEric/feature/1508/finer-grained-dd-controls
Added finer grained controls to DataDistribution in fdbcli.
2019-07-31 17:36:20 -07:00
Evan Tschannen bba01c6531 fix: add subsetOfEmergencyTeam could add an unsorted team 2019-07-31 16:02:08 -07:00
Xin Dong b653ddb30d Final clean ups after rebasing master 2019-07-30 22:35:34 -07:00
Xin Dong 5d20364423 Address review comments 2019-07-30 22:24:30 -07:00
Xin Dong 1922c39377 Resolve review comments. 100K run shows one suspecious ASSERT_WE_THINK failure which I think could be a race. 2019-07-30 22:24:30 -07:00
Xin Dong c6e5472d8d Apply suggestions from code review
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2019-07-30 22:20:45 -07:00
Xin Dong f5d6e3a5b3 - Addressed review commends
- Added test for the storage server failure disable switch
2019-07-30 22:20:45 -07:00
Xin Dong ae11efcb0a Made following changes:
- Make sure the disabled data distribution won't be accidentally enabled by the 'maintenance' command
- Make sure the status json reflects the status of DD accordingly
- Make sure the CLI can play with the new DD states correctly, i.e. print out warns when necessary
2019-07-30 22:20:45 -07:00
Xin Dong 4ecfc9830f Added finer grained controls to DataDistribution in fdbcli. What's happening under the hood is:
- Use pre-existing 'healthZone' key and write a special value to it in order to disable DD for all storage server failures
- Use a new system key 'rebalanceDDIgnored' key to disable/enable DD for all rebalance reasons(MountainChopper and ValleyFiller)

Kicked off two 200K correctness and showed no related errors.
2019-07-30 22:17:21 -07:00
Evan Tschannen dd4ab63d90 fixed another bad trace event name 2019-07-30 19:36:26 -07:00
Evan Tschannen b8cd51c4d3 fixed invalid trace event name 2019-07-30 19:23:54 -07:00
Evan Tschannen a78a97f186
Merge pull request #1908 from etschannen/feature-better-dd
A few data distribution improvements
2019-07-30 17:34:50 -07:00
sramamoorthy a88aaa0f04 review comment 2019-07-30 17:04:51 -07:00
sramamoorthy 63941e0d96 disable DD with a in-memory flag and use in snapv2 2019-07-30 17:04:51 -07:00
Evan Tschannen 5dd9043fd3 addressed review comments 2019-07-30 17:04:41 -07:00
Evan Tschannen 481642fbd4 Merge branch 'master' into feature-better-dd 2019-07-30 16:56:27 -07:00
Evan Tschannen a3fe3d4324
Merge pull request #1923 from xumengpanda/mengxu/evan-dd-improvement-minor-improvement
DD:Change condition for lastBuildTeamsFailed
2019-07-30 16:54:42 -07:00
A.J. Beamon 14648e20f9
Merge pull request #1901 from ajbeamon/data-distribution-receives-bytes-input-rate
Send bytes input rate to data distribution
2019-07-30 15:01:36 -07:00
Meng Xu 0e50656c7f DD:Change condition for lastBuildTeamsFailed
Change the threshold team number per server that should set lastBuildTeamsFailed
from DESIRED_TEAMS_PER_SERVER to
(SERVER_KNOBS->DESIRED_TEAMS_PER_SERVER * (configuration.storageTeamSize + 1)) / 2;
2019-07-30 11:07:02 -07:00
Evan Tschannen a0f26b604c
Merge pull request #1907 from etschannen/master
A number of bug fixes for rare problems found by correctness testing
2019-07-29 21:04:38 -07:00
sramamoorthy 5a56f6b456 minor snap create client improvement and bug fixes 2019-07-29 20:28:22 -07:00
Evan Tschannen cc4481b71a team builders prefer to make teams which overlap less with existing teams 2019-07-28 23:44:23 -07:00
Evan Tschannen 7e97bd181a fix: we need to build teams when a server becomes healthy if it is possible another servers does not have enough teams 2019-07-28 19:31:21 -07:00
Evan Tschannen 04dd293af0
Merge pull request #1874 from xumengpanda/mengxu/DD-code-read
DataDistribution:Add comments to help understand the code
2019-07-26 13:30:44 -07:00
Evan Tschannen 2123fa1c3a
Merge pull request #1853 from xumengpanda/mengxu/redundantTeamRemoverPriority-PR
Lower the RelocateShard priority for removing redundant teams
2019-07-26 13:28:42 -07:00
A.J. Beamon b91795d288 Send bytes input rate to DD. 2019-07-25 16:27:32 -07:00
senthil-ram edeec8a622 Update fdbserver/DataDistribution.actor.cpp
Co-Authored-By: Alex Miller <35046903+alexmiller-apple@users.noreply.github.com>
2019-07-24 15:36:28 -07:00
sramamoorthy a65c9f92ed get rid of all timeouts and other changes 2019-07-24 15:36:28 -07:00
sramamoorthy a2f2ad96ff code review comments and merge to master changes 2019-07-24 15:36:28 -07:00
sramamoorthy 4f2bb561de snapshot only local tlogs and not the satellite 2019-07-24 15:36:28 -07:00
sramamoorthy 021c949801 increase snaptime out to 15s for simulator 2019-07-24 15:36:28 -07:00
sramamoorthy 869f77aef1 Few cosmetic edits and fixes 2019-07-24 15:36:28 -07:00
sramamoorthy ddd4523816 bug fix in timeout & header file re-arrange in DD 2019-07-24 15:36:28 -07:00
sramamoorthy 31c010b393 few minor fixes 2019-07-24 15:36:28 -07:00
sramamoorthy 62c14dae72 disable dd during snap and enable in restore 2019-07-24 15:36:28 -07:00
sramamoorthy ba6bccce73 snap v2: DD changes - snapshot orchestration logic 2019-07-24 15:36:28 -07:00
Meng Xu b7478f5dd3 DD:Add comments to help understand code
Add comments to explain the functionalities of some code.
2019-07-22 11:23:16 -07:00
Meng Xu 378db79441 Resolve conflict when merge with master 2019-07-22 10:56:20 -07:00
Meng Xu dae4436a3d TC:UnitTest:Change invariant due to alg change 2019-07-20 21:06:54 -07:00
Meng Xu b001a9ebe8 ServerTeamRemover runs after machineTeamRemover finishes
If serverTeamRemover removes a team before machineTeamRemover brings
the machine team number down to the desired number, DD may create a new
team (due to teams removed by serverTeamRemover), which may be removed
later by machineTeamRemover. This causes unnnecessary extra data movement.
2019-07-19 16:48:52 -07:00
Meng Xu 64bee63dbc Resolve two review comments
1) No need to check server with only one team when teamRemover finds
a server team or machine team to remove

2) Fix optimalTeamCount counting in teamTracker
2019-07-18 18:46:31 -07:00
Meng Xu 915732ce24 TeamRemover:Reset the removed team counter after removement 2019-07-16 11:17:51 -07:00
Meng Xu 20f067e794 Merge with master:Resolve conflict with PR#1797 2019-07-16 10:52:28 -07:00
Meng Xu 243504b125 DD:Clang format changes 2019-07-15 18:40:14 -07:00
Meng Xu 94e9b8a3b4 Do not remove a team whose min team number is less than target
If the minimum number of teams of servers in a team is less than the
target value (desired_team_number_per_server * (teamSize + 1) / 2),
the team remover should not remove it. Otherwise, DD will oscillate in
building more teams and removing redundant teams.

Do not do consistency check for three_data_hall mode because when
machines are not evenly distributed across data halls, we will
need to build more teams than the total desired number to make sure
the number of teams per server is no less than the target value.
2019-07-15 18:30:13 -07:00
Meng Xu cafe9b9412 TC:Target team num per server is desired number
Do not overbuild teams because we may oscillate between building more teams and
removing the redundant teams. The oscillation happens when the machines are not
evenly distributed across availability zones.
For example, in three_data_hall mode, we have 1 machine in 1 data hall for 2 data halls.
We have 3 machines in the 3rd data hall. To build enough (and more teams) for servers
in the 3rd data hall, we will overbuild teams. However,
the teamRemover will remove those newly teams.
2019-07-15 17:32:51 -07:00
Meng Xu 415622f465 MachineTeamRemover:Change to remove MT with most teams
Change to remove machine team with most machine teams, using the same
logic as the serverTeamRemover.

The featue is guarded by TR_FLAG_REMOVE_MT_WITH_MOST_TEAMS knob.
2019-07-15 14:29:49 -07:00
Meng Xu 5c5e883745 TC:Keep building until each server and machine has at least the expected number of teams 2019-07-12 19:16:18 -07:00
Meng Xu 8454d74da9 TC:Change remainingTeamBudget to ensure each server has more than desired team number 2019-07-12 18:39:01 -07:00
Meng Xu 1c0daa7f2c Resolve review comments:Remove unneeded code 2019-07-12 18:10:04 -07:00
Meng Xu aa19da6977 TC:TraceAllInfo:Remove unused variable
Also change some code format in self review
2019-07-12 10:41:05 -07:00
Meng Xu 4da2071b49 ServerTeamRemover:Believe all servers are healthy when we start to remove
Before the serverTeamRemover tries to pick a team to remove,
it waits for all data movement to finish, which means all teams are healthy.

When the serverTeamRemover starts to pick a team to remove,
we believe all servers are healthy.
2019-07-11 23:47:31 -07:00
Meng Xu cf935ff9e6 Remove debug message and format code 2019-07-11 22:05:20 -07:00
Meng Xu bb758c18ee ServerTracker:Not always mark server undesired when no healthy team exists
A storage server is not desired to be colocated with tLogs.
So we want to mark the server as undesired.

However, if there is not enough process in the system, we will
have no choice but do so.

The old logic makes the server undesired if optimalTeamCount > 0;
However, there is a rare case when optimalTeamCount is 1 when it is supposed to be 0.
To overcome the situation, we add another condition healthyTeamCount > 0
as a guard to mark such a colocated server undesired.
2019-07-11 17:36:57 -07:00
Meng Xu 221e6945db TeamTracker:Fix bug in counting optimalTeamCount
When a teamTracker is cancelled, e.g, by redundant teamRemover or badTeamRemover,
we should decrease the optimalTeamCount if the team is considered as an
optimal team, i.e., all members' machine fitness is no worse than unset, and
the team is healthy.
2019-07-11 17:22:41 -07:00
Meng Xu c6e42d6119 ReplicationPolicy:Add trace for the name of each keyIndex 2019-07-10 19:29:29 -07:00
Meng Xu 4fae510633 AddBestMachineTeams:BugFix:Must build team when it has remainingMachineTeamBudget 2019-07-10 11:55:06 -07:00
Meng Xu 9816fb6aca ConsistencyCheck:Check minServerTeamOnServer larger than 0 2019-07-10 11:53:47 -07:00
Meng Xu aa459a2b03 AddTeamsBestOf:Calculate minTeamNumPerServer before use it 2019-07-09 14:28:39 -07:00
Meng Xu 522230f050 ConsistencyCheck:getTeamCollectionValid tries 10 times before return false
Because serverTeamRemover takes time to remove teams,
getTeamCollectionValid() need to wait for a while before concluding that
the number of server teams is larger than the desired number.
2019-07-09 11:46:57 -07:00
Meng Xu cf03b274a2 TeamTracker:Add traceTeamCollectionInfo 2019-07-08 23:01:25 -07:00
Meng Xu bf8af985b9 ServerTeamRemover: Change unit test to include the remover
Also further speed up serverTeamRemover in simulation, and
Add comments
2019-07-08 20:12:16 -07:00
Meng Xu 3b9618fe11 ServerTeamRemover:Speedup removing teams in simulation
Otherwise, simulation may time out when team remover needs to
remove hundreds of teams.
2019-07-08 18:17:21 -07:00
Meng Xu 08d76a7bbe ServerTeamRemover:Bug fix and clang-format 2019-07-08 17:08:32 -07:00
Meng Xu 9cc11e88c5 TeamBuilder:Reduce unnecessary calculation of remainingTeamBudget 2019-07-08 16:56:06 -07:00
Meng Xu 874539149a ServerTeamRemover: Resolve review comments
Pick the team whose minimum team number of a server is the largest one to remove.

AddTeamsBestOf should keep building teams until each server has at least the
target number of teams.
2019-07-08 16:40:37 -07:00
Meng Xu 08a721b320 Merge branch 'master' into mengxu/server-team-remover-PR 2019-07-08 16:30:32 -07:00
A.J. Beamon 0a5c7608df Remove "Number" suffix from newly added events (and variables that feed the events). 2019-07-08 15:45:28 -07:00
A.J. Beamon f52c239ef8 Merge branch 'master' into trace-event-rename
# Conflicts:
#	fdbserver/DataDistribution.actor.cpp
#	fdbserver/QuietDatabase.actor.cpp
2019-07-08 15:37:00 -07:00
Evan Tschannen ec11ef024b
Merge pull request #1798 from ajbeamon/merge-release-6.1-into-master
Merge release 6.1 into master
2019-07-08 09:02:56 -07:00
A.J. Beamon dd85edb08c
Merge pull request #1802 from xumengpanda/mengxu/DD-ensure-redundant-team-priority-as700-PR
TeamTracker:Set redundant team priority as PRIORITY_TEAM_REDUNDANT
2019-07-08 08:47:28 -07:00
Jingyu Zhou 50e7593c5b
Merge pull request #1796 from ajbeamon/remove-trace-event-underscores
Remove trace event underscores
2019-07-05 21:45:55 -07:00
Meng Xu e8fb7564f5 Merge branch 'master' into mengxu/DD-ensure-redundant-team-priority-as700-PR 2019-07-05 17:28:12 -07:00
Meng Xu c7a996267c TeamRemover: Remove unused declaration
Also change state variable to variable.
2019-07-05 16:54:06 -07:00
Meng Xu 46d28a3b79 TeamTracker:Set redundant team priority as redundant
The redundant team removed by teamRemover will not exist
in the global teams data structure. So we will not find
the redundant team from shard-to-team mapping in the system key.

Before this change, teamTracker marks such team as PRIORITY_TEAM_UNHEALTHY.
With this change, it marks it as PRIORITY_TEAM_REDUNDANT
2019-07-05 15:24:00 -07:00
A.J. Beamon 2a56e011ea Merge branch 'release-6.1' into merge-release-6.1-into-master
# Conflicts:
#	documentation/sphinx/source/release-notes.rst
#	fdbserver/DataDistribution.actor.cpp
2019-07-05 13:52:29 -07:00
Meng Xu 7ba6cd2d9d ServerTeamRemover:Reduce the overshot server team number to build
Each server has the maximum of DESIRED_TEAMS_PER_SERVER and
(DESIRED_TEAMS_PER_SERVER * storageTeamSize) / 2)
2019-07-05 11:01:50 -07:00
A.J. Beamon 2a709ee5d0 Rename event details that use the suffix "Number" to indicate a count, as number could also imply an index. Rename a few other trace events and details that e.g. needed to be pluralized. 2019-07-05 08:54:21 -07:00
A.J. Beamon a3ac9c7eea Remove underscores from some trace event names 2019-07-05 08:08:29 -07:00
Meng Xu 2782d432ac ServerTeamRemover:Update the desired number and pick unhealthy teams first 2019-07-02 22:17:53 -07:00
Meng Xu 599fcb2e6d Add serverTeamRemover to remove redundant server teams 2019-07-02 17:40:37 -07:00
Meng Xu 7461c87ae6 AddTeamsBestOf: Build more teams than desired
We build more teams than we finally want so that we can use serverTeamRemover() actor to remove the teams
whose member belong to too many teams. This allows us to get a more balanced number of teams per server.
2019-07-02 17:40:37 -07:00
Evan Tschannen 86b0224347 Merge branch 'release-6.1' of github.com:apple/foundationdb into release-6.1 2019-07-02 16:27:31 -07:00
Evan Tschannen 64e33bb4f9 added logging for maintenance mode 2019-07-02 16:25:29 -07:00
Meng Xu 7afbd10a10 Change teamRemover to machineTeamRemover 2019-07-02 15:16:34 -07:00
Meng Xu d2d6022ed4 StorageServerTracker:Do not always set doBuildTeams
When interface changes, we set doBuildTeams to true only when
the interface location changes.
2019-07-02 14:24:26 -07:00
Meng Xu de5bcaf588 minTeamNumber for server and machine cannot be uint64_t
Because the consistency check will try to conver the value to int64_t.
If no server exists, the variable will not be updated and thus get overflowed
when it is converted to int64_t
2019-07-01 21:39:18 -07:00
Meng Xu 347a7ecdff MachineTeams:Make traceTeamCollectionInfo not an actor 2019-07-01 16:50:53 -07:00
Meng Xu b8cb883040 AddBestMachineTeams:Fix input must be non-negative value 2019-06-28 22:46:16 -07:00
Meng Xu 63c42533eb TaceTeamCollectionInfo:Remove delay 2019-06-28 16:19:58 -07:00
Meng Xu 875cb877ac TeamCollection: Apply clang-format 2019-06-28 16:01:05 -07:00
Meng Xu 0baae134f6 TeamCollectionInfo: Resolve review comments 2019-06-28 15:59:47 -07:00
Meng Xu cb681693df TeamCollection:Do NOT consider healthyness in counting team number
If a team is removed from DD, it will be marked as failed and eventually removed from the
global teams data structure.
Team healthyness is likely to be a temporary state which can be changed rather quickly.
2019-06-28 09:50:43 -07:00
Meng Xu ce7eb10cac TeamCollectionInfo: Only count team number for healthy server and machine 2019-06-27 19:04:22 -07:00
Meng Xu f889843332 Change traceTeamCollectionInfo to actor
There are cases where traceTeamCollectionInfo was called within the same execution block, i.e.,
no wait between the two traceTeamCollectionInfo calls.
Because simulation uses the same time for all execution instructions in the same execution block,
having more than one traceTeamCollectionInfo at the same time will mess up the trackLatest semantics.
When one of them is always chosen by simulator, simulation test will report false positive error.

Changing this function to actor and adding a small delay inside the function can solve this problem.
2019-06-27 18:24:20 -07:00
Meng Xu 4fe3c7f749 TeamCollectionInfo:Revert to original version where it is 2019-06-27 17:09:21 -07:00
Meng Xu 42620e4831 TeamCollectionTest:GetTeamCollectionValid wait until values are correct 2019-06-27 16:52:36 -07:00