Commit Graph

816 Commits

Author SHA1 Message Date
Andrew Noyes 1e0e800751 Fix build 2020-10-16 12:10:07 -07:00
Andrew Noyes 2b87627d1b Check for cancellation after errorOut.sendError(e) 2020-10-16 12:10:07 -07:00
Xin Dong 92e31dd338 Address review comments 2020-10-15 15:25:00 -07:00
Xin Dong 1d43729cc9 Added a way to print detailed information about team collection for debugging. 2020-10-15 10:01:56 -07:00
Andrew Noyes a1e868a569
Merge pull request #3862 from sfc-gh-tclinkenbeard/use-override-more
Add uses of override keyword, remove unnecessary uses of virtual
2020-10-14 15:06:45 -07:00
A.J. Beamon 3b66a1f2d4 Fix a couple places where we were creating vectors with default elements rather than reserving space. 2020-10-09 10:51:06 -07:00
sfc-gh-tclinkenbeard a9607bdcec Explicitly seal classes that inherit but aren't inherited from 2020-10-07 21:58:24 -07:00
sfc-gh-tclinkenbeard 8571dcfe28 Use override where applicable in fdbserver 2020-10-07 18:41:19 -07:00
Jon Fu b4ad989252 use stack transaction instead of heap 2020-10-05 16:51:01 -04:00
Evan Tschannen 52a6496a54 fix compiler errors 2020-10-04 16:50:54 -07:00
sfc-gh-tclinkenbeard 91a8367acb Avoid slow task in ~DataDistributionTracker 2020-10-01 11:44:55 -07:00
Jon Fu 69580593dd Merge branch 'master' of https://github.com/apple/foundationdb into jfu-snapshot-record-version 2020-09-23 15:35:05 -04:00
sfc-gh-tclinkenbeard 0814841827 Replace NULL with nullptr in fdbserver 2020-09-20 11:31:49 -07:00
Jon Fu 260c8d9568 Merge branch 'master' of https://github.com/apple/foundationdb into jfu-snapshot-record-version 2020-09-11 15:05:58 -04:00
Evan Tschannen ae7bf24353
Merge pull request #3549 from yliucode/grv-proxy
Separate out a new role GrvProxy to serve GRVs.
2020-09-03 19:03:45 -07:00
Young Liu 87693cae81 merge master branch and resolve conflicts 2020-09-02 13:44:33 -07:00
A.J. Beamon b4c96cadc7 Merge branch 'release-6.3' into merge-release-6.3-into-master 2020-09-02 12:45:57 -07:00
Jon Fu d334b6484e attempt to write to system keys with snapshot 2020-09-02 15:17:54 -04:00
Evan Tschannen 0443ea7a9b fix: prioritize marking a region as fully replicated over removing machine teams 2020-09-01 15:55:33 -07:00
Evan Tschannen 12edadd059 Merge branch 'release-6.3'
# Conflicts:
#	CMakeLists.txt
#	fdbclient/Knobs.cpp
#	fdbclient/MasterProxyInterface.h
#	fdbrpc/simulator.h
#	fdbserver/MasterProxyServer.actor.cpp
#	tests/fast/CycleAndLock.txt
#	tests/fast/TxnStateStoreCycleTest.txt
#	tests/fast/VersionStamp.txt
#	tests/slow/ParallelRestoreOldBackupApiCorrectnessAtomicRestore.txt
#	tests/slow/ParallelRestoreOldBackupCorrectnessCycle.txt
#	versions.target
2020-08-31 19:33:34 -07:00
Young Liu 8994719e46 Merge branch 'master' into grv-proxy 2020-08-31 10:21:32 -07:00
Young Liu e87327b33b Merge master branch and keep master proxy reporting txn cost estimation to ratekeeper 2020-08-29 12:47:35 -07:00
Meng Xu ca9b1f5b34 Merge branch 'release-6.3' into mengxu/fr-sched-PR
Resolve conflict at BackupContainer.actor.cpp
2020-08-27 16:54:00 -07:00
sfc-gh-tclinkenbeard c3991262cf Add nullptr check to traceAllInfo 2020-08-27 09:40:42 -07:00
Young Liu 63b3612ad5 Merge master branch and resolve conflicts 2020-08-24 16:42:31 -07:00
Xiaoxi Wang 3afdb44c7a merge master 2020-08-23 17:09:04 +00:00
David Youngworth e1b7dd0c7d Merge remote-tracking branch 'upstream/release-6.3' into dyoungworth/fixMerge1 2020-08-22 12:25:19 -07:00
Xiaoxi Wang 3b63d8b01b remove FIXME; remote tagSet.reset(); trivial changes 2020-08-21 19:17:16 +00:00
A.J. Beamon f864606d8d Don't block the data distributor when getting a GetDataDistributorMetricsRequest. 2020-08-21 18:16:07 +00:00
A.J. Beamon 6380b92b10 Don't block the data distributor when getting a GetDataDistributorMetricsRequest. 2020-08-21 09:26:18 -07:00
Xiaoxi Wang 599675cba8 modify some details to get better performance 2020-08-19 04:23:23 +00:00
Meng Xu 1e571a5a1a FastRestore:Loader:Kick off scheduler when loader starts to have new requests 2020-08-15 21:57:00 -07:00
Xiaoxi Wang f3ecf14601 change midShardSize type and other details 2020-08-12 17:49:12 +00:00
Young Liu 79ce16650d merge master branch 2020-08-11 19:22:10 -07:00
Xiaoxi Wang 0cceda9908 solve distributor present bug 2020-08-11 21:54:52 +00:00
Meng Xu 97e49f2f70 Resolve throttling events 2020-08-10 22:01:12 -07:00
Xiaoxi Wang 696e77c94e query midShardSize from proxy 2020-08-10 20:13:44 +00:00
Xiaoxi Wang df9149fea4 ignore transaction tag of immediate transactions 2020-08-07 23:36:17 +00:00
Xiaoxi Wang 13307679c5 use median shard size" 2020-08-05 03:57:25 +00:00
Xiaoxi Wang b903e60cb7 fix monitorDDMetricsChanges bugs 2020-08-03 17:12:36 +00:00
Xiaoxi Wang d1cc87452c merge with master; solve conflicts; solve initialization; 2020-08-02 22:44:07 +00:00
Xiaoxi Wang c3a629588f add client transaction tag sample 2020-07-31 19:08:42 +00:00
Young Liu 30ea639666 Remove debug traces 2020-07-29 07:55:05 -07:00
Young Liu f7b76a92af pass joshua 2020-07-29 07:26:55 -07:00
Evan Tschannen a49cb41de7 Merge branch 'release-6.3'
# Conflicts:
#	CMakeLists.txt
#	cmake/ConfigureCompiler.cmake
#	fdbserver/Knobs.cpp
#	fdbserver/StorageCache.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	flow/ThreadHelper.actor.h
#	flow/serialize.h
#	tests/CMakeLists.txt
2020-07-29 00:31:55 -07:00
Xiaoxi Wang 819e3ab3e8 Merge branch 'ratekeeper' 2020-07-28 16:48:50 +00:00
Xiaoxi Wang 48a0fb5154 ask DD for shard info 2020-07-25 04:08:12 +00:00
Young Liu 525f10e30c Merge master branch 2020-07-22 16:08:49 -07:00
Russell Sears ab0d8b0626
Merge pull request #3509 from sfc-gh-anoyes/anoyes/remove-using-relops
Remove using namespace std::rel_ops
2020-07-22 11:58:25 -07:00
sfc-gh-tclinkenbeard 638f586f78 Remove unnecessary override 2020-07-21 11:05:46 -07:00
sfc-gh-tclinkenbeard 83c5a30f62 Add encapsulation to TCTeamInfo and ParallelTCInfo 2020-07-21 11:05:41 -07:00
sfc-gh-tclinkenbeard 9a2ce4c981 Make IDataDistributionTeam const-correct 2020-07-21 11:05:34 -07:00
Meng Xu b2a3b4fd83 Merge branch 'master' into mengxu/merge-6.3-PR 2020-07-20 11:34:18 -07:00
Meng Xu 1ba9b6b07f DD:Change SendRelocateToDDQx100 to SendRelocateToDDQueue 2020-07-17 14:10:17 -07:00
Meng Xu 098cdfb558 Replace actor_cancelled error with dd_cancelled 2020-07-16 20:26:07 -07:00
Meng Xu ba3c631350 Remove spammy trace 2020-07-16 10:33:24 -07:00
Meng Xu 638e612a97 Improve coding style and trace events 2020-07-16 10:25:42 -07:00
Meng Xu acbb389862 Debug and fix very rare crash in TeamTracker
teamTracker only works when all DDTeamCollections are valid.
However, teamTracker can be triggered by zeroTeamSignalling event
after a DDTeamCollection is destructed and the other DDTeamCollection has not been
destructed yet.

This causes teamTracker to uses a pointer to the destructed DDTeamCollection and thus
has mysterious failure.
2020-07-16 10:23:02 -07:00
Young Liu 5b06d69d25 Pass watches test 2020-07-15 00:37:41 -07:00
Meng Xu 47ae66bd61 Merge branch 'master' into mengxu/tmp-minor-comment-PR
Resolve conflict at waitFailureClient
2020-07-13 16:17:50 -07:00
Meng Xu ef8c1060a2 Merge branch 'master' into mengxu/tmp-merge-6.3 2020-07-13 10:15:56 -07:00
Meng Xu 6f2e12be42 Minor improvement on comments 2020-07-12 18:32:47 -07:00
Andrew Noyes f470ba8316 Remove using namespace std::rel_ops
This causes the following to not compile anymore

\#include <utility>
\#include <vector>

using namespace std::rel_ops;

int main() {
    std::vector<int> xs;
    return xs.rbegin() != xs.rend();
}

See https://godbolt.org/z/s1977n
2020-07-10 22:58:15 +00:00
A.J. Beamon b09dddc07e Merge branch 'release-6.2' into merge-release-6.2-into-release-6.3
# Conflicts:
#	cmake/ConfigureCompiler.cmake
#	documentation/sphinx/source/downloads.rst
#	fdbrpc/FlowTransport.actor.cpp
#	fdbrpc/fdbrpc.vcxproj
#	fdbserver/DataDistributionQueue.actor.cpp
#	fdbserver/Knobs.cpp
#	fdbserver/Knobs.h
#	fdbserver/LogSystemPeekCursor.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	fdbserver/Status.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	flow/flow.vcxproj
2020-07-10 15:06:34 -07:00
Evan Tschannen 5e02fd490e fix: the check for if a teamCollection was tracking a source server was unreliable, leading to scenarios where we would temporarily replicate a shard less than teamSIze 2020-06-29 10:02:27 -07:00
negoyal cf13e00a8f Merge remote-tracking branch 'origin/release-6.3' into fdb_cache_wo_allocator 2020-06-01 17:38:31 -07:00
Chaoguang Lin 6ce574f5ad Merge remote-tracking branch 'upstream/release-6.3' into add-data-distribution-metrics 2020-05-17 23:36:52 -07:00
Markus Pilman c2bc75516f Merge branch 'release-6.3' of github.com:apple/foundationdb into features/trace-roles 2020-05-14 10:34:53 -07:00
Evan Tschannen 48b1b20f67 Fixed a crash related to destruction order in data distribution 2020-05-10 23:14:19 -07:00
Chaoguang Lin ef724bf939 Merge remote-tracking branch 'upstream/master' into add-data-distribution-metrics 2020-05-08 18:39:28 -07:00
chaoguang e8b62e48f4 Rename DDMetrics to DDMetricsRef 2020-05-08 17:17:27 -07:00
Markus Pilman 5f9b127e56 Emit traces regularly about role assignment
We are currently emitting Role transition traces when a role starts and
when it ends. While this is useful for debugging, it doesn't work well
with tools that inject data and might potentially miss some trace lines.

We do decorate each trace lines with the roles assigned to that
particular process, however, this is not sufficient for tools that can
make use of the UID -> Role mapping
2020-05-08 16:27:57 -07:00
negoyal f4d30f8dce Fix the compilation error. 2020-05-06 19:09:40 -07:00
Markus Pilman 94570ea590 Data distributor now waitfails caches 2020-05-06 10:35:56 -07:00
Evan Tschannen aed2d34bcb Merge branch 'master' into feature-proxy-load-balance
# Conflicts:
#	fdbclient/NativeAPI.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	flow/Knobs.cpp
2020-05-01 09:19:39 -07:00
Evan Tschannen b7f5f3be48 merge in master 2020-04-28 13:11:47 -07:00
Evan Tschannen 0c84ad4bc6
Merge pull request #2917 from bnamasivayam/fail-slow-ss
Mark the storage servers that are continually lagging as unhealthy
2020-04-22 23:18:35 -07:00
Balachandar Namasivayam d5bef6fc32
Update fdbserver/DataDistribution.actor.cpp 2020-04-22 09:45:56 -07:00
Evan Tschannen ba3e2af473 Merge commit '5288033bcfe40c3ade97c8bf2d04cf31b3f16cb1' into feature-tree-broadcast 2020-04-17 15:17:37 -07:00
Evan Tschannen 33efb9ec97 code cleanup based on review comments 2020-04-17 15:05:01 -07:00
Alex Miller 1439de37b5 Convert GetRangeLimits() -> TOO_MANY + ASSERT(). 2020-04-12 18:23:14 -07:00
Evan Tschannen ce4493f679 many bug fixes 2020-04-10 13:45:16 -07:00
Balachandar Namasivayam 6916434f7d Addressed review comments 2020-04-08 10:48:32 -07:00
Balachandar Namasivayam 69ef8a127b Add a backstop mechanism to stop failing too many storage servers when they fall behind. 2020-04-06 23:37:11 -07:00
Alex Miller 6078fd1b18 Convert UID to Tag in keyServers to reduce txnStateStore size 2020-04-05 14:30:09 -07:00
Balachandar Namasivayam 73272fc72e Version difference is now the diff between TLog versions and SS version. 2020-04-03 19:04:43 -07:00
Balachandar Namasivayam a70bfcc3c8 Remove unnecessary comment. 2020-03-31 18:33:12 -07:00
Balachandar Namasivayam b1c3893d40 Fix some corner case bugs exposed by simulation.
In one case, when a SS joins the cluster and DD doesn't find any healthy server to form a team with the newly added server, then the SS does not get added to any team even when the other servers get healthy.
Another is an extreme case where a data center is down, and a SS in the active DC joins and then dies immediately but not before DD adds it to a destination team for a relocating shard which will result in DD waiting indefinitely for the dead data center to come back up for the cluster to be fully recovered.
2020-03-31 18:33:12 -07:00
Balachandar Namasivayam ad1dd4fd9b Mark the storage servers that are continually lagging as unhealthy and so this will give the Data Distributor the chance to move data out of this server. 2020-03-31 18:25:39 -07:00
tclinken 247ab84323 Merge branch 'master' of https://github.com/apple/foundationdb into add-data-distribution-metrics 2020-03-23 17:01:17 -07:00
Evan Tschannen e08f0201f1 merge release 6.2 into master 2020-03-17 12:51:47 -07:00
Evan Tschannen 7adc916e18
Merge pull request #2806 from ajbeamon/improve-team-request-performance
Improve performance of get team requests.
2020-03-16 11:56:45 -07:00
A.J. Beamon 700b13e5f8 Remember the best team from team requests, which will likely be the best again and can save us some computation. 2020-03-13 15:21:33 -07:00
Evan Tschannen 12f2b32770 added additional logging in data distribution 2020-03-13 15:19:33 -07:00
Evan Tschannen 9e99a00c8f fix: do not use priority 0 left when calculating priorities for empty teams 2020-03-13 13:56:46 -07:00
A.J. Beamon 555db50cd1 Avoid calling into SABTF so frequently. Use a cheaper call that only checks that shards exist. 2020-03-12 11:22:03 -07:00
Evan Tschannen 303df197cf Merge branch 'release-6.2'
# Conflicts:
#	CMakeLists.txt
#	bindings/c/test/mako/mako.c
#	documentation/sphinx/source/release-notes.rst
#	fdbbackup/backup.actor.cpp
#	fdbclient/NativeAPI.actor.cpp
#	fdbclient/NativeAPI.actor.h
#	fdbserver/DataDistributionQueue.actor.cpp
#	fdbserver/Knobs.cpp
#	fdbserver/Knobs.h
#	fdbserver/LogRouter.actor.cpp
#	fdbserver/SkipList.cpp
#	fdbserver/fdbserver.actor.cpp
#	flow/CMakeLists.txt
#	flow/Knobs.cpp
#	flow/Knobs.h
#	flow/flow.vcxproj
#	flow/flow.vcxproj.filters
#	versions.target
2020-03-06 18:22:46 -08:00
Evan Tschannen 1128666840 added additional logging on the log router 2020-03-05 18:17:06 -08:00
Evan Tschannen e219c1671f Merge branch 'release-6.2' into feature-dd-region-queue
# Conflicts:
#	fdbserver/Knobs.h
2020-03-04 16:25:38 -08:00
Evan Tschannen 125bd13198 fix: in multi-region configurations, the data distribution queue could start too much work, expecting that the remote region would contribute to the read workload 2020-03-04 14:17:17 -08:00
Evan Tschannen 6296465e07 Make the DD priority associated with populating a remote region lower than machine failures 2020-03-04 14:07:32 -08:00
Evan Tschannen 924d335aa7 Merge branch 'release-6.2'
# Conflicts:
#	documentation/sphinx/source/release-notes.rst
#	flow/Knobs.cpp
#	flow/Knobs.h
2020-02-25 18:25:19 -08:00
Evan Tschannen c05c95cbe8 forgot to rename the knob 2020-02-25 15:47:39 -08:00
Evan Tschannen 96258b9809 Merge branch 'release-6.2'
# Conflicts:
#	documentation/sphinx/source/release-notes.rst
#	fdbcli/fdbcli.actor.cpp
#	fdbclient/ManagementAPI.actor.cpp
#	fdbrpc/FlowTransport.actor.cpp
#	fdbserver/ClusterController.actor.cpp
#	fdbserver/DataDistribution.actor.cpp
#	fdbserver/DataDistribution.actor.h
#	fdbserver/DataDistributionQueue.actor.cpp
#	fdbserver/KeyValueStoreMemory.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	fdbserver/QuietDatabase.actor.cpp
#	fdbserver/SkipList.cpp
#	fdbserver/StorageMetrics.actor.h
#	fdbserver/TLogServer.actor.cpp
#	fdbserver/fdbserver.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/KVStoreTest.actor.cpp
#	flow/CMakeLists.txt
#	flow/Knobs.cpp
#	flow/Knobs.h
#	flow/genericactors.actor.cpp
#	flow/serialize.h
2020-02-21 19:09:16 -08:00
Evan Tschannen aa4d1357b3 handle the case that there is only one healthy team 2020-02-21 15:41:01 -08:00
Evan Tschannen 457dbc5215
Update fdbserver/DataDistribution.actor.cpp
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2020-02-21 15:39:17 -08:00
Evan Tschannen 6a634652c4
Update fdbserver/DataDistribution.actor.cpp
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2020-02-21 15:39:06 -08:00
Evan Tschannen 08914a2acd Once available space ratio falls below 0.3 avoid moving data to teams with less free space than the median team 2020-02-21 15:14:32 -08:00
Evan Tschannen 819c55556c More aggressively attempt to find teams that do not have low disk space 2020-02-20 16:47:50 -08:00
A.J. Beamon e1fb568fd1 Merge branch 'release-6.2' into dd-use-available-space
# Conflicts:
#	fdbserver/DataDistribution.actor.cpp
#	fdbserver/DataDistribution.actor.h
#	fdbserver/DataDistributionQueue.actor.cpp
2020-02-20 16:12:42 -08:00
A.J. Beamon e4b483796d Combine some logic that was doing similar computations for free space ratio. 2020-02-20 14:52:08 -08:00
A.J. Beamon 4c9c736253 Data distribution uses available space instead of free space when evaluating whether processes are low on space and penalizing them. 2020-02-20 11:21:03 -08:00
A.J. Beamon 3a1ba5a077 Rename variable for clarity 2020-02-20 10:59:52 -08:00
A.J. Beamon c164acb88d Add new criteria to DD's GetTeamRequest that allow you to require shards be present on the team and that the team have a minimum free ratio. This avoids scenarios where the team chosen when processing the request is later rejected by the requestor, causing rebalancing movements to get stuck. 2020-02-20 09:32:00 -08:00
mpilman 5a9d420cb7 Merge remote-tracking branch 'upstream/release-6.2' into release-merges/20200210 2020-02-10 10:02:05 -08:00
A.J. Beamon b8a252da40 Clarify the names of a couple trace fields 2020-02-10 08:15:00 -08:00
tclinken c9363e7e28 Merge branch 'master' of https://github.com/apple/foundationdb into add-data-distribution-metrics 2020-01-22 21:02:21 -08:00
Evan Tschannen 3f9d9d8b84 Merge branch 'release-6.2'
# Conflicts:
#	CMakeLists.txt
#	cmake/FlowCommands.cmake
#	documentation/sphinx/source/release-notes.rst
#	fdbclient/StorageServerInterface.h
#	fdbserver/DataDistributionTracker.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	fdbserver/fdbserver.actor.cpp
#	flow/Knobs.h
#	flow/Platform.cpp
#	versions.target
2020-01-16 18:37:47 -08:00
tclinken 1d6ac716a1 Merge remote-tracking branch 'origin' into add-data-distribution-metrics 2020-01-15 13:20:04 -08:00
Evan Tschannen 9b80498180 Added a trace event to warn if a shard is merged before enough time has elapses from becoming low bandwidth 2020-01-10 14:58:38 -08:00
Evan Tschannen c2608f0af9 fix: completeSources could be larger than the teamSize, so we need to check all completeSources
we do not need to track bestSize, since all teams in the list will be the same size
2020-01-10 14:46:40 -08:00
Evan Tschannen ab7071932f Data distribution no longer attempts to pick teams which share members of the source unless the team matches exactly 2020-01-09 16:59:37 -08:00
Evan Tschannen 83ad9caf54 implemented a load balancing algorithm which evens out the number of requests processes by each proxy 2020-01-08 01:59:01 -08:00
Evan Tschannen 59738e8ef1 fixed compiler error 2019-11-22 16:19:34 -08:00
Evan Tschannen 3c769fcf60 Merge branch 'release-6.2'
# Conflicts:
#	CMakeLists.txt
#	documentation/sphinx/source/release-notes.rst
#	fdbserver/ClusterController.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	versions.target
2019-11-22 15:39:19 -08:00
Evan Tschannen 3a3ab5664b fix: team trackers for bad teams that contain a removed servers must be cancelled or the cluster will falsely report those teams as failed 2019-11-22 10:20:13 -08:00
Andrew Noyes d4de608bb6 Fix OPEN_FOR_IDE build 2019-10-25 10:42:22 -07:00
Evan Tschannen f8e44d2f71 fix: If a storage server was offline, it would not be checked for being in an undesired dc 2019-10-23 23:04:39 -07:00
Jon Fu d2b6626d5c Merge branch 'master' of https://github.com/apple/foundationdb into mark-ss-failed 2019-10-21 13:47:06 -07:00
Evan Tschannen 688940b685 merge 6.2 into master 2019-10-21 11:43:46 -07:00
Jon Fu b1fd6b4443 addressed review comments 2019-10-18 09:43:25 -07:00
Jon Fu 896701006f addressed code review changes 2019-10-16 11:30:20 -07:00
Evan Tschannen 86bcb84b45 Raised the data distribution priority of splitting shards above restoring fault tolerance to avoid hot write shards 2019-10-11 17:50:43 -07:00
Jon Fu 34baa37e60 Merge branch 'master' of https://github.com/apple/foundationdb into mark-ss-failed 2019-10-10 10:14:58 -07:00
Meng Xu 1bd6151f54
Update fdbserver/DataDistribution.actor.cpp
Co-Authored-By: Jingyu Zhou <jingyuzhou@gmail.com>
2019-10-09 21:17:03 -07:00
Meng Xu 26e1d565f6 StorageServerTracker:Fix OOM bug caused by server healthyness toggles infinitely
When there is only one healthy team, the bug will set a server's status as unhealthy;
which causes the healthyTeam to 0, triggering StorageServerTracker to loop back;
which resets the server's status to healthy, and thus the healthyTeam to non-zero.

This pattern will cause infinite loop.

Infinite loop will prevent TraceEvent from flushing, which causes
TraceEvent to use most of memory and out-of-memory.

Kudos to JingYu Zhou (jingyu_zhou@apple.com) who is the main contributor who found the bug!
2019-10-09 17:45:09 -07:00
Jon Fu eb41e32876 add extra dd safety check to deny exclude if only 1 team exists 2019-10-08 16:10:09 -07:00
Jon Fu ff563c1672 fixed trace line description 2019-10-07 12:45:27 -07:00
Jon Fu d146f1d636 Merge branch 'master' of https://github.com/apple/foundationdb into mark-ss-failed 2019-10-07 11:27:15 -07:00
A.J. Beamon 22c3fa867c
Merge pull request #2074 from xumengpanda/mengxu/fix-correctness-bug
DD:fix:getTeam may fail to get a team when it can
2019-10-07 09:33:57 -07:00
Jon Fu cc41cd610d force recheck in tracker if team contains failed server 2019-10-04 14:02:12 -07:00
Meng Xu 6dae95a4ca
Update fdbserver/DataDistribution.actor.cpp
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2019-10-04 10:02:11 -07:00
Jon Fu 31332da57d move option setting inside retry loop 2019-10-03 13:24:28 -07:00
Jon Fu abb46d527b fixed implementation of watches in TrackExcludedServers 2019-10-03 13:18:05 -07:00
Jon Fu d96a7b2c69 Merge branch 'master' of https://github.com/apple/foundationdb into mark-ss-failed 2019-10-03 09:47:45 -07:00
Meng Xu 5286523a43 StorageServerTracker:Distinguish wrongDC from invalidLocality 2019-10-02 14:50:53 -07:00
Meng Xu 9e7dfa358c Replace isCorrectDC with isCorrectLocality
This incorporates the change for defending DD from misconfigured
locality entries.

The check for misconfigured locality was in keyValueStoreTypeTracker,
but the storage engine switch PR moves the isCorrectDC checking out of
the tracker and move it into storageServerTracker
2019-10-02 14:05:43 -07:00
Meng Xu d0147e5e5d Merge branch 'release-6.2' into mengxu/merge-release620-to-master-v3
Resolved Conflicts:
	documentation/sphinx/source/release-notes.rst
	fdbserver/DataDistribution.actor.cpp
	versions.target
2019-10-02 13:22:56 -07:00
Evan Tschannen 4b5080fbea added a few more missing data distribution priorities 2019-09-27 19:39:53 -07:00
Evan Tschannen 324d0bd3b0 Merge branch 'release-6.2' of github.com:apple/foundationdb into feature-cleanup-mutations 2019-09-27 19:15:14 -07:00
Evan Tschannen 3bb62e008c lowered the priority of some delays in data distribution so that the process will prefer other work 2019-09-27 18:33:13 -07:00
Jon Fu efa2f5df6b avoid double overwrite on failed servers and reordered removal of keys 2019-09-26 13:52:53 -07:00
Jon Fu 450a09e117 Code Review Changes 2019-09-24 15:48:50 -07:00
Meng Xu 32ebd08f9f DD:Trigger storage recruitment when an invalid address locality is corrected 2019-09-24 13:35:38 -07:00
Meng Xu 515689d07b
Update fdbserver/DataDistribution.actor.cpp
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2019-09-18 14:45:18 -07:00
Meng Xu d175b61a62 DD:Trace when invalid locality is corrected
Change getWorkers param from txn handler to db
2019-09-18 13:52:54 -07:00
Jon Fu 40ad6f0931 created new reply types to work with flatbuffer serialization requirements 2019-09-18 13:40:18 -07:00
Jon Fu 471e283128 Merge branch 'master' of https://github.com/apple/foundationdb into mark-ss-failed 2019-09-18 11:49:07 -07:00
Meng Xu 93bbc26a35 set:erase:Use return value of erase iterator as next iterator 2019-09-17 15:28:30 -07:00
Meng Xu d2fd1f4931 DD:MisconfiguredLocality:Fix review comments 2019-09-17 13:04:21 -07:00
Meng Xu 37d2318eed DD:Handle worker with incorrect locality
When a worker has incorrect locality, the worker will be excluded from
storage recruitment.
When the worker has its locality corrected by system operators,
the worker will be reincluded for storage recruitment.
2019-09-14 12:12:56 -07:00
Meng Xu c3960aba17 DD:initializeStorage:Exclude worker with invalid locality 2019-09-13 22:05:41 -07:00
Meng Xu 75460089e1 DD_VALIDATE_LOCALITY:Add comment for our future selves
When we add simulation test that misconfigure a cluster by not setting some
locality entries, we should set DD_VALIDATE_LOCALITY always true.
Otherwise, simulation tests may fail.
2019-09-13 16:26:54 -07:00
Meng Xu 78b8e48cef DD:ValidLocality:Resolve review comment 2019-09-13 15:35:16 -07:00
Meng Xu e1dcdbf3d2 LocalityData:Remove verbose check for valid locality 2019-09-13 15:11:13 -07:00
Meng Xu 8970d9858b DD:isValidLocality:A generic way to check any replicationPolicy 2019-09-13 14:55:51 -07:00
Meng Xu 1196841b3d DD:IsValidLocality:Clang format 2019-09-13 13:56:43 -07:00
Meng Xu e8878b16d4 DD:Valid locality includes an empty but set locality entry 2019-09-13 13:55:46 -07:00
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