Skip to content

Commit

Permalink
remove (buggy?) alias replication_factor
Browse files Browse the repository at this point in the history
  • Loading branch information
tsterker committed Nov 27, 2023
1 parent 43a5bd9 commit 1e96350
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/CollectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function create(string $name, array $options = []): ResultInterface
$defaults = [
'num_shards' => 1,
'router_name' => 'compositeId',
'nrt_replicas' => 1, // alias: replication_factor
'nrt_replicas' => 1,
'tlog_replicas' => 0,
'pull_replicas' => 0,

Expand All @@ -112,7 +112,7 @@ public function create(string $name, array $options = []): ResultInterface
->setNumShards($options['num_shards'])
->setRouterName($options['router_name'])

->setNrtReplicas($options['nrt_replicas'] ?? $options['replication_factor'])
->setNrtReplicas($options['nrt_replicas'])
->setPullReplicas($options['pull_replicas'])
->setTlogReplicas($options['tlog_replicas'])

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/CollectionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function it_creates_collection_with_options()
{
$this->manager->create('foo', [
'num_shards' => 2,
'nrt_replicas' => 2, // alias: replication_factor
'nrt_replicas' => 2,
'pull_replicas' => 1,
'tlog_replicas' => 1,
'router_name' => 'compositeId',
Expand Down

0 comments on commit 1e96350

Please sign in to comment.