Skip to content

Commit

Permalink
Add 'REPLICATION_MINIMUM_FACTOR' to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
databyjp committed Oct 11, 2024
1 parent d9dc851 commit 51ef99c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
1 change: 1 addition & 0 deletions developers/weaviate/config-refs/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ All other values are interpreted as `false`.
| `RAFT_GRPC_MESSAGE_MAX_SIZE` | The maximum internal raft gRPC message size in bytes. Defaults to 1073741824 | `string - number` | `1073741824` |
| `RAFT_JOIN` | Manually set Raft voter nodes. If set, RAFT_BOOTSTRAP_EXPECT needs to be adjusted manually to match the number of Raft voters. | `string` | `weaviate-0,weaviate-1` |
| `RAFT_METADATA_ONLY_VOTERS` | If `true`, voter nodes only handle the schema. They do not accept any data. | `boolean` | `false` |
| `REPLICATION_MINIMUM_FACTOR` | The minimum replication factor for all collections in the cluster. | `string - number` | `3` |

<!-- Docs notes:
MAINTENANCE_NODES: not documented, for internal use only
Expand Down
31 changes: 10 additions & 21 deletions developers/weaviate/configuration/replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,17 @@ import RaftRFChangeWarning from '/_includes/1-25-replication-factor.mdx';

Replication is disabled by default. It can be enabled per collection in the [collection configuration](../manage-data/collections.mdx#replication-settings). This means you can set different replication factors per class in your dataset.

To enable replication, set the replication factor:

```yaml
{
"class": "ExampleClass",
"properties": [
{
"name": "exampleProperty",
"dataType": [
"text"
]
}
],
# highlight-start
"replicationConfig": {
"factor": 3 # Integer, default 1. How many copies of this class will be stored.
}
# highlight-end
}
```
To enable replication, you can set one or both of the following:
- `REPLICATION_MINIMUM_FACTOR` environment variable for the entire Weaviate instance, or
- `replicationFactor` parameter for a collection.

### Weaviate-wide minimum replication factor

The `REPLICATION_MINIMUM_FACTOR` environment variable sets the minimum replication factor for all collections in the Weaviate instance.

If you set the [replication factor for a collection](#replication-factor-for-a-collection), the collection's replication factor overrides the minimum replication factor.

The client code looks like this:
### Replication factor for a collection

import SchemaReplication from '/_includes/code/schema.things.create.replication.mdx';

Expand Down

0 comments on commit 51ef99c

Please sign in to comment.