8000 Bug fix 3.5/min replication factor by mchacki · Pull Request #9524 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Bug fix 3.5/min replication factor #9524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
88898e5
Cherry-pick minReplicationFactor
mchacki Jul 19, 2019
e1b4318
Bug fix/failover with min replication factor (#9486)
mchacki Jul 19, 2019
676dacb
Removed merge conflict leftovers 0o, i should not trust the IDE
mchacki Jul 19, 2019
c0a2f49
Update js/apps/system/_admin/aardvark/APP/frontend/js/views/collectio…
mchacki Jul 22, 2019
ac7c442
Update js/apps/system/_admin/aardvark/APP/frontend/js/views/collectio…
mchacki Jul 22, 2019
217a97e
Update Documentation/Books/Manual/Architecture/Replication/README.md
KVS85 Jul 22, 2019
1e30086
Update CHANGELOG
KVS85 Jul 22, 2019
28da794
Update Documentation/Books/Manual/DataModeling/Collections/DatabaseMe…
KVS85 Jul 22, 2019
9cba4e8
Update Documentation/Books/Manual/ReleaseNotes/NewFeatures35.md
KVS85 Jul 22, 2019
dde5733
Update Documentation/DocuBlocks/Rest/Collections/1_structs.md
KVS85 Jul 22, 2019
0b2a9fd
Update js/apps/system/_admin/aardvark/APP/frontend/js/views/graphMana…
KVS85 Jul 22, 2019
991e886
Update js/apps/system/_admin/aardvark/APP/frontend/js/views/graphMana…
KVS85 Jul 22, 2019
abd5bf1
Update Documentation/DocuBlocks/Rest/Graph/1_structs.md
mchacki Jul 22, 2019
8154144
Apply suggestions from code review
mchacki Jul 22, 2019
4c6685e
Adepted review requests, thanks for finding!
mchacki Jul 22, 2019
8b106c7
Merge branch 'bug-fix-3.5/minReplicationFactor' of ssh://github.com/a…
mchacki Jul 22, 2019
4216052
Removed unnecessary const
mchacki Jul 22, 2019
314600a
Apply suggestions from code review
mchacki Jul 22, 2019
28e54e7
Moved initilization of variable more downwards
mchacki Jul 22, 2019
a284e66
Apply lock before notify_all()
mchacki Jul 22, 2019
0144f4e
Remove documentation except DocuBlocks, covered by PR in docs repo
Simran-B Jul 22, 2019
70c2b0f
Remove accidental indent
Simran-B Jul 22, 2019
ecc031e
Merge branch '3.5' into bug-fix-3.5/minReplicationFactor
KVS85 Jul 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ v3.5.0-rc.5 (2019-XX-XX)
------------------------

* MinReplicationFactor:
Collections can now be created with a minimal replication factor (minReplicationFactor) default 1.
Collections can now be created with a minimal replication factor (minReplicationFactor), which defaults to 1.
If minReplicationFactor > 1 a collection will go into "read-only" mode as soon as it has less then minReplicationFactor
many insync followers. With this mechanism users can avoid to have collections diverge too much in case of failure scenarios.
minReplicationFactor can have the values: 1 <= minReplicationFactor <= replicationFactor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ factor. The number of _followers_ can be controlled using the
kept, that is, it is one plus the number of _followers_.

In addition to the `replicationFactor` we have a `minReplicationFactor`
the locks down a collection as soon as we have lost too many followers.
that locks down a collection for writing as soon as we have lost too many followers.


Asynchronous replication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ to the [naming conventions](../NamingConventions/README.md).
many copies in the cluster a shard will refuse to write. The
minReplicationFactor can not be larger than replicationFactor.
Please note: during server failures this might lead to writes
not beeing possible until the failover is sorted out and might cause
not being possible until the failover is sorted out and might cause
write slow downs in trade of data durability.

- *distributeShardsLike*: distribute the shards of this collection
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Books/Manual/ReleaseNotes/NewFeatures35.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Collections
-----------

All collections now support a minimum replication factor (minReplicationFactor) property.
This is default set to `1`, which is identical to previous behaviour.
This is default set to `1`, which is identical to previous behavior.
If in a failover scenario a shard of a collection has less than minReplicationFactor many insync followers it will go into "read-only" mode and will reject writes until enough followers are insync again.
In more detail:
Having `minReplicationFactor == 1` means as soon as a "master-copy" is available of the data
Expand Down
4 changes: 2 additions & 2 deletions Documentation/DocuBlocks/Rest/Collections/1_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ determine the target shard for documents; *Cluster specific attribute.*
contains how many copies of each shard are kept on different DBServers.; *Cluster specific attribute.*

@RESTSTRUCT{minReplicationFactor,collection_info,integer,optional,}
contains how many minimal copies of each shard are kept on different DBServers.
The shards will refuse to write, if we have less then these many copies in sync.; *Cluster specific attribute.*
contains how many minimal copies of each shard need to be in sync on different DBServers.
The shards will refuse to write, if we have less then these many copies in sync. *Cluster specific attribute.*

@RESTSTRUCT{shardingStrategy,collection_info,string,optional,}
the sharding strategy selected for the collection; *Cluster specific attribute.*
Expand Down
2 changes: 1 addition & 1 deletion Documentation/DocuBlocks/Rest/Graph/1_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The replication factor used for every new collection in the graph.

@RESTSTRUCT{minReplicationFactor,graph_representation,integer,optional,}
The minimal replication factor used for every new collection in the graph.
If one shard has less then minimal replication factor copies, we cannot write
If one shard has less than minReplicationFactor copies, we cannot write
to this shard, but to all others.

@RESTSTRUCT{isSmart,graph_representation,boolean,required,}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The replication factor used when initially creating collections for this graph.

@RESTSTRUCT{minReplicationFactor,post_api_gharial_create_opts,integer,optional,}
The minimal replication factor used for every new collection in the graph.
If one shard has less then minimal replication factor copies, we cannot write
If one shard has less than minReplicationFactor copies, we cannot write
to this shard, but to all others.

@RESTRETURNCODES
Expand Down
6 changes: 3 additions & 3 deletions Documentation/DocuBlocks/collectionProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ In a cluster setup, the result will also contain the following attributes:
on different DBServers. Has to be in the range of 1-10 *(Cluster only)*

* *minReplicationFactor* : determines the number of minimal shard copies kept on
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably not be indented

different DBServers, a shard will refuse to write, if less then this amount
different DBServers, a shard will refuse to write if less than this amount
of copies are in sync. Has to be in the range of 1-replicationFactor *(Cluster only)*

* *shardingStrategy*: the sharding strategy selected for the collection.
Expand All @@ -81,8 +81,8 @@ one or more of the following attribute(s):
different DBServers, valid values are integer numbers
in the range of 1-10 *(Cluster only)*

* *minReplicationFactor* : Change the number of minimal shard copies kept on
different DBServers, a shard will refuse to write, if less then this amount
* *minReplicationFactor* : Change the number of minimal shard copies to be in sync on
different DBServers, a shard will refuse to write if less than this amount
of copies are in sync. Has to be in the range of 1-replicationFactor *(Cluster only)*

**Note**: some other collection properties, such as *type*, *isVolatile*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
try {
if (Number.parseInt(minReplicationFactor) > Number.parseInt(replicationFactor)) {
// validation here, as our Joi integration misses some core features
arangoHelper.arangoError("New Collection", "Minimal replication factor is not allowed to be greater then replication factor");
arangoHelper.arangoError("New Collection", "Minimal replication factor is not allowed to be greater than replication factor");
abort = true;
}
} catch (ignore) {
Expand Down Expand Up @@ -602,7 +602,7 @@
'new-min-replication-factor',
'Mininum replication factor',
'',
'Numeric value. Must be at least 1 and must be smaller or equal compared to the replicationFactor. Minimal number of copies of the data in the cluster.',
'Numeric value. Must be at least 1 and must be smaller or equal compared to the replicationFactor. Minimal number of copies of the data in the cluster to be in sync in order to allow writes.',
'',
false,
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@
'new-minReplicationFactor',
'Minimal Replication factor',
'',
'Numeric value. Must be at least 1 and must be smaller or equal compared to the replicationFactor. Minimal number of copies of the data in the cluster.',
'Numeric value. Must be at least 1 and must be smaller or equal compared to the replicationFactor. Minimal number of copies of the data in the cluster to be in sync in order to allow writes.',
'',
false,
[
Expand Down Expand Up @@ -967,7 +967,7 @@
'general-minReplicationFactor',
'Minimal replication factor',
'',
'Numeric value. Must be at least 1. Must be smaller or equal compared to the replicationFactor. Total number of copies of the data in the cluster. If we get below this value the collection will be read-only until enough copies are created.',
'Numeric value. Must be at least 1. Must be smaller or equal compared to the replicationFactor. Total number of copies of the data in the cluster to be in sync. If we get below this value the collection will be read-only until enough copies are created.',
'',
false,
[
Expand Down
0