Skip to content
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

[Segment Replication] Add global primary shard balance constraint during allocation #6643

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

dreamer-89
Copy link
Member

@dreamer-89 dreamer-89 commented Mar 13, 2023

Description

This change is a follow up of #6422 where constraint based per index primary balance was introduced. This change adds a new constraint isPrimaryShardsPerNodeBreached which is marked breached if a node contains more than average number of primary shards across all indices. This is intentionally applied for allocation and will be applied for rebalancing as fast follow up tracked in #6642

Issues Resolved

#6210

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ing allocation

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@dreamer-89
Copy link
Member Author

@nknize @shwetathareja @Bukhtawar @mch2 : Request for review.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

Codecov Report

Merging #6643 (aa872c1) into main (671f1ba) will decrease coverage by 0.07%.
The diff coverage is 93.33%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #6643      +/-   ##
============================================
- Coverage     70.76%   70.69%   -0.07%     
+ Complexity    59141    59137       -4     
============================================
  Files          4803     4804       +1     
  Lines        283187   283188       +1     
  Branches      40837    40837              
============================================
- Hits         200384   200212     -172     
- Misses        66340    66571     +231     
+ Partials      16463    16405      -58     
Impacted Files Coverage Δ
...r/routing/allocation/allocator/ShardsBalancer.java 20.00% <0.00%> (-5.00%) ⬇️
...rg/opensearch/common/settings/ClusterSettings.java 92.30% <ø> (ø)
...ch/cluster/routing/allocation/ConstraintTypes.java 92.30% <92.30%> (ø)
...ster/routing/allocation/AllocationConstraints.java 100.00% <100.00%> (ø)
...nsearch/cluster/routing/allocation/Constraint.java 100.00% <100.00%> (+21.42%) ⬆️
...uster/routing/allocation/RebalanceConstraints.java 100.00% <100.00%> (ø)
.../allocation/allocator/BalancedShardsAllocator.java 91.41% <100.00%> (-0.94%) ⬇️
...ting/allocation/allocator/LocalShardsBalancer.java 85.37% <100.00%> (+0.34%) ⬆️

... and 479 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dreamer-89
Copy link
Member Author

Cluster setup

3 data nodes
3 cluster manager nodes

➜  opensearch-cluster-cdk git:(inclusive_naming_changes) ✗ curl -s -X GET "$host/_cat/nodes?v"                                                              
ip         heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles      cluster_manager name
10.0.5.11            47          68   0    0.00    0.00     0.00 m         cluster_manager *               seed
10.0.4.133           34          98  81    6.59    6.53     4.99 di        data,ingest     -               ip-10-0-4-133.us-west-2.compute.internal
10.0.3.5             60          98  75    5.39    5.57     5.26 di        data,ingest     -               ip-10-0-3-5.us-west-2.compute.internal
10.0.5.108           19          68   0    0.00    0.00     0.00 m         cluster_manager -               ip-10-0-5-108.us-west-2.compute.internal
10.0.3.112           43          68   0    0.00    0.00     0.00 m         cluster_manager -               ip-10-0-3-112.us-west-2.compute.internal
10.0.5.39            25          98  58    5.76    4.47     2.90 di        data,ingest     -               ip-10-0-5-39.us-west-2.compute.internal
➜

Benchmark used

ubuntu@ip-172-31-49-145:~/OpenSearch-Benchmark$ opensearch-benchmark execute_test --pipeline benchmark-only --workload nyc_taxis --target-hosts "$host:80" --workload-params=~/.benchmark/segrep_index_settings_large_no_of_shards.json --results-file=~/.benchmark/with_primary_balance.md --show-in-results=all
...

Index setting

ubuntu@ip-172-31-49-145:~$ cat ~/.benchmark/segrep_index_settings_large_no_of_shards.json
{
    "index_settings":{
        "number_of_replicas": 1,
        "number_of_shards":50,
        "index":{
            "replication": {"type": "SEGMENT"}
        }
    }
}

Test steps performed

Start benchmark (nyc_taxis here) and then shut down OpenSearch process on one data node. This should result in primaries be distributed in remaining two nodes. Once the node is brought up, shards are balanced. With cluster.routing.allocation.balance.prefer_primary set to true, the primary shards are balanced first resulting in more uniform primary distribution. Without this setting, the shards are balanced (moved out) randomly from heavier nodes.

Without primary balance

Shard distribution

ubuntu@ip-172-31-49-145:~$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 25 Replica: 25
Shard distribution on 10.0.3.5
Primary: 25 Replica: 25
Shard distribution on 10.0.5.39
Primary: 0 Replica: 0
...
ubuntu@ip-172-31-49-145:~/OpenSearch-Benchmark$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 17 Replica: 16
Shard distribution on 10.0.3.5
Primary: 19 Replica: 15
Shard distribution on 10.0.5.39
Primary: 14 Replica: 19

Benchmark report

ubuntu@ip-172-31-49-145:~/OpenSearch-Benchmark$ cat ~/.benchmark/without_primary_balance.md
|                                                         Metric |                     Task |      Value |   Unit |
|---------------------------------------------------------------:|-------------------------:|-----------:|-------:|
|                     Cumulative indexing time of primary shards |                          |    167.244 |    min |
|             Min cumulative indexing time across primary shards |                          |    2.25197 |    min |
|          Median cumulative indexing time across primary shards |                          |    3.36518 |    min |
|             Max cumulative indexing time across primary shards |                          |    4.03253 |    min |
|            Cumulative indexing throttle time of primary shards |                          |          0 |    min |
|    Min cumulative indexing throttle time across primary shards |                          |          0 |    min |
| Median cumulative indexing throttle time across primary shards |                          |          0 |    min |
|    Max cumulative indexing throttle time across primary shards |                          |          0 |    min |
|                        Cumulative merge time of primary shards |                          |    94.5642 |    min |
|                       Cumulative merge count of primary shards |                          |       5463 |        |
|                Min cumulative merge time across primary shards |                          |    1.31985 |    min |
|             Median cumulative merge time across primary shards |                          |    1.87408 |    min |
|                Max cumulative merge time across primary shards |                          |    2.71783 |    min |
|               Cumulative merge throttle time of primary shards |                          |    17.8315 |    min |
|       Min cumulative merge throttle time across primary shards |                          |    0.12735 |    min |
|    Median cumulative merge throttle time across primary shards |                          |   0.372908 |    min |
|       Max cumulative merge throttle time across primary shards |                          |   0.689233 |    min |
|                      Cumulative refresh time of primary shards |                          |    71.0345 |    min |
|                     Cumulative refresh count of primary shards |                          |      47771 |        |
|              Min cumulative refresh time across primary shards |                          |   0.909167 |    min |
|           Median cumulative refresh time across primary shards |                          |    1.47808 |    min |
|              Max cumulative refresh time across primary shards |                          |    1.73413 |    min |
|                        Cumulative flush time of primary shards |                          |   0.761017 |    min |
|                       Cumulative flush count of primary shards |                          |        223 |        |
|                Min cumulative flush time across primary shards |                          | 0.00308333 |    min |
|             Median cumulative flush time across primary shards |                          |   0.012725 |    min |
|                Max cumulative flush time across primary shards |                          |  0.0527833 |    min |
|                                        Total Young Gen GC time |                          |    296.221 |      s |
|                                       Total Young Gen GC count |                          |      21785 |        |
|                                          Total Old Gen GC time |                          |          0 |      s |
|                                         Total Old Gen GC count |                          |          0 |        |
|                                                     Store size |                          |    69.0933 |     GB |
|                                                  Translog size |                          |   0.491367 |     GB |
|                                         Heap used for segments |                          |          0 |     MB |
|                                       Heap used for doc values |                          |          0 |     MB |
|                                            Heap used for terms |                          |          0 |     MB |
|                                            Heap used for norms |                          |          0 |     MB |
|                                           Heap used for points |                          |          0 |     MB |
|                                    Heap used for stored fields |                          |          0 |     MB |
|                                                  Segment count |                          |        957 |        |
|                                                 Min Throughput |                    index |    44163.8 | docs/s |
|                                                Mean Throughput |                    index |    56094.8 | docs/s |
|                                              Median Throughput |                    index |    57972.2 | docs/s |
|                                                 Max Throughput |                    index |    61174.3 | docs/s |
|                                        50th percentile latency |                    index |    1207.63 |     ms |
|                                        90th percentile latency |                    index |    1437.44 |     ms |
|                                        99th percentile latency |                    index |    1882.52 |     ms |
|                                      99.9th percentile latency |                    index |    14283.5 |     ms |
|                                     99.99th percentile latency |                    index |      16504 |     ms |
|                                       100th percentile latency |                    index |      16601 |     ms |
|                                   50th percentile service time |                    index |    1207.63 |     ms |
|                                   90th percentile service time |                    index |    1437.44 |     ms |
|                                   99th percentile service time |                    index |    1882.52 |     ms |
|                                 99.9th percentile service time |                    index |    14283.5 |     ms |
|                                99.99th percentile service time |                    index |      16504 |     ms |
|                                  100th percentile service time |                    index |      16601 |     ms |
|                                                     error rate |                    index |          0 |      % |
|                                                 Min Throughput | wait-until-merges-finish |      12.86 |  ops/s |
|                                                Mean Throughput | wait-until-merges-finish |      12.86 |  ops/s |
|                                              Median Throughput | wait-until-merges-finish |      12.86 |  ops/s |
|                                                 Max Throughput | wait-until-merges-finish |      12.86 |  ops/s |
|                                        50th percentile latency | wait-until-merges-finish |            |        |
|                                        90th percentile latency | wait-until-merges-finish |            |        |
|                                        99th percentile latency | wait-until-merges-finish |            |        |
|                                      99.9th percentile latency | wait-until-merges-finish |            |        |
|                                     99.99th percentile latency | wait-until-merges-finish |            |        |
|                                       100th percentile latency | wait-until-merges-finish |    77.4571 |     ms |
|                                   50th percentile service time | wait-until-merges-finish |            |        |
|                                   90th percentile service time | wait-until-merges-finish |            |        |
|                                   99th percentile service time | wait-until-merges-finish |            |        |
|                                 99.9th percentile service time | wait-until-merges-finish |            |        |
|                                99.99th percentile service time | wait-until-merges-finish |            |        |
|                                  100th percentile service time | wait-until-merges-finish |    77.4571 |     ms |
|                                                     error rate | wait-until-merges-finish |          0 |      % |
|                                                 Min Throughput |                  default |       3.01 |  ops/s |
|                                                Mean Throughput |                  default |       3.02 |  ops/s |
|                                              Median Throughput |                  default |       3.02 |  ops/s |
|                                                 Max Throughput |                  default |       3.04 |  ops/s |
|                                        50th percentile latency |                  default |    10.8131 |     ms |
|                                        90th percentile latency |                  default |    11.4907 |     ms |
|                                        99th percentile latency |                  default |    19.0599 |     ms |
|                                      99.9th percentile latency |                  default |            |        |
|                                     99.99th percentile latency |                  default |            |        |
|                                       100th percentile latency |                  default |     21.325 |     ms |
|                                   50th percentile service time |                  default |    9.35042 |     ms |
|                                   90th percentile service time |                  default |    9.70569 |     ms |
|                                   99th percentile service time |                  default |    17.5502 |     ms |
|                                 99.9th percentile service time |                  default |            |        |
|                                99.99th percentile service time |                  default |            |        |
|                                  100th percentile service time |                  default |    20.3465 |     ms |
|                                                     error rate |                  default |          0 |      % |
|                                                 Min Throughput |                    range |        0.7 |  ops/s |
|                                                Mean Throughput |                    range |       0.71 |  ops/s |
|                                              Median Throughput |                    range |       0.71 |  ops/s |
|                                                 Max Throughput |                    range |       0.71 |  ops/s |
|                                        50th percentile latency |                    range |    46.4898 |     ms |
|                                        90th percentile latency |                    range |    49.2596 |     ms |
|                                        99th percentile latency |                    range |    53.4006 |     ms |
|                                      99.9th percentile latency |                    range |            |        |
|                                     99.99th percentile latency |                    range |            |        |
|                                       100th percentile latency |                    range |    63.1883 |     ms |
|                                   50th percentile service time |                    range |    44.0009 |     ms |
|                                   90th percentile service time |                    range |    46.8863 |     ms |
|                                   99th percentile service time |                    range |    50.7681 |     ms |
|                                 99.9th percentile service time |                    range |            |        |
|                                99.99th percentile service time |                    range |            |        |
|                                  100th percentile service time |                    range |    60.5396 |     ms |
|                                                     error rate |                    range |          0 |      % |
|                                                 Min Throughput |      distance_amount_agg |       2.01 |  ops/s |
|                                                Mean Throughput |      distance_amount_agg |       2.01 |  ops/s |
|                                              Median Throughput |      distance_amount_agg |       2.01 |  ops/s |
|                                                 Max Throughput |      distance_amount_agg |       2.02 |  ops/s |
|                                        50th percentile latency |      distance_amount_agg |     9.3383 |     ms |
|                                        90th percentile latency |      distance_amount_agg |    9.74717 |     ms |
|                                        99th percentile latency |      distance_amount_agg |    10.8088 |     ms |
|                                      99.9th percentile latency |      distance_amount_agg |            |        |
|                                     99.99th percentile latency |      distance_amount_agg |            |        |
|                                       100th percentile latency |      distance_amount_agg |    16.5493 |     ms |
|                                   50th percentile service time |      distance_amount_agg |    7.71017 |     ms |
|                                   90th percentile service time |      distance_amount_agg |    8.14001 |     ms |
|                                   99th percentile service time |      distance_amount_agg |    9.10277 |     ms |
|                                 99.9th percentile service time |      distance_amount_agg |            |        |
|                                99.99th percentile service time |      distance_amount_agg |            |        |
|                                  100th percentile service time |      distance_amount_agg |      14.97 |     ms |
|                                                     error rate |      distance_amount_agg |          0 |      % |
|                                                 Min Throughput |            autohisto_agg |        1.5 |  ops/s |
|                                                Mean Throughput |            autohisto_agg |        1.5 |  ops/s |
|                                              Median Throughput |            autohisto_agg |        1.5 |  ops/s |
|                                                 Max Throughput |            autohisto_agg |       1.51 |  ops/s |
|                                        50th percentile latency |            autohisto_agg |    85.8957 |     ms |
|                                        90th percentile latency |            autohisto_agg |    89.5563 |     ms |
|                                        99th percentile latency |            autohisto_agg |     101.67 |     ms |
|                                      99.9th percentile latency |            autohisto_agg |            |        |
|                                     99.99th percentile latency |            autohisto_agg |            |        |
|                                       100th percentile latency |            autohisto_agg |    105.357 |     ms |
|                                   50th percentile service time |            autohisto_agg |    84.2711 |     ms |
|                                   90th percentile service time |            autohisto_agg |    87.4972 |     ms |
|                                   99th percentile service time |            autohisto_agg |    99.9547 |     ms |
|                                 99.9th percentile service time |            autohisto_agg |            |        |
|                                99.99th percentile service time |            autohisto_agg |            |        |
|                                  100th percentile service time |            autohisto_agg |    104.099 |     ms |
|                                                     error rate |            autohisto_agg |          0 |      % |
|                                                 Min Throughput |       date_histogram_agg |       1.51 |  ops/s |
|                                                Mean Throughput |       date_histogram_agg |       1.51 |  ops/s |
|                                              Median Throughput |       date_histogram_agg |       1.51 |  ops/s |
|                                                 Max Throughput |       date_histogram_agg |       1.52 |  ops/s |
|                                        50th percentile latency |       date_histogram_agg |    83.5381 |     ms |
|                                        90th percentile latency |       date_histogram_agg |    87.1894 |     ms |
|                                        99th percentile latency |       date_histogram_agg |    90.2307 |     ms |
|                                      99.9th percentile latency |       date_histogram_agg |            |        |
|                                     99.99th percentile latency |       date_histogram_agg |            |        |
|                                       100th percentile latency |       date_histogram_agg |    91.7875 |     ms |
|                                   50th percentile service time |       date_histogram_agg |    82.0609 |     ms |
|                                   90th percentile service time |       date_histogram_agg |    85.4402 |     ms |
|                                   99th percentile service time |       date_histogram_agg |    88.1987 |     ms |
|                                 99.9th percentile service time |       date_histogram_agg |            |        |
|                                99.99th percentile service time |       date_histogram_agg |            |        |
|                                  100th percentile service time |       date_histogram_agg |     90.287 |     ms |
|                                                     error rate |       date_histogram_agg |          0 |      % |

With primary balance

➜  opensearch-cluster-cdk git:(inclusive_naming_changes) ✗ curl -s -X GET "$host/_cluster/settings?pretty"                                     
{
  "persistent" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "balance" : {
            "prefer_primary" : "true"
          },
          "node_concurrent_recoveries" : "8"
        }
      }
    }
  },
  "transient" : {
    "logger" : {
      "org" : {
        "opensearch" : {
          "cluster" : {
            "routing" : {
              "allocation" : "TRACE"
            }
          },
          "index" : {
            "shard" : "DEBUG"
          }
        }
      }
    }
  }
}

Snapshot of shard distribution

ubuntu@ip-172-31-49-145:~$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 25 Replica: 25
Shard distribution on 10.0.3.5
Primary: 25 Replica: 25
Shard distribution on 10.0.5.39
Primary: 0 Replica: 0

ubuntu@ip-172-31-49-145:~$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 21 Replica: 25
Shard distribution on 10.0.3.5
Primary: 21 Replica: 25
Shard distribution on 10.0.5.39
Primary: 10 Replica: 0

ubuntu@ip-172-31-49-145:~$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 17 Replica: 25
Shard distribution on 10.0.3.5
Primary: 17 Replica: 25
Shard distribution on 10.0.5.39
Primary: 16 Replica: 2

ubuntu@ip-172-31-49-145:~$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 17 Replica: 21
Shard distribution on 10.0.3.5
Primary: 17 Replica: 22
Shard distribution on 10.0.5.39
Primary: 16 Replica: 9

ubuntu@ip-172-31-49-145:~$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 17 Replica: 17
Shard distribution on 10.0.3.5
Primary: 17 Replica: 18
Shard distribution on 10.0.5.39
Primary: 16 Replica: 17

ubuntu@ip-172-31-49-145:~$ ~/show_allocation $host
Shard distribution on 10.0.4.133
Primary: 17 Replica: 16
Shard distribution on 10.0.3.5
Primary: 17 Replica: 17
Shard distribution on 10.0.5.39
Primary: 16 Replica: 17

Benchmark report

ubuntu@ip-172-31-49-145:~/OpenSearch-Benchmark$ cat ~/.benchmark/with_primary_balance.md
|                                                         Metric |                     Task |      Value |   Unit |
|---------------------------------------------------------------:|-------------------------:|-----------:|-------:|
|                     Cumulative indexing time of primary shards |                          |    167.079 |    min |
|             Min cumulative indexing time across primary shards |                          |    2.64763 |    min |
|          Median cumulative indexing time across primary shards |                          |    3.37325 |    min |
|             Max cumulative indexing time across primary shards |                          |    4.00903 |    min |
|            Cumulative indexing throttle time of primary shards |                          |          0 |    min |
|    Min cumulative indexing throttle time across primary shards |                          |          0 |    min |
| Median cumulative indexing throttle time across primary shards |                          |          0 |    min |
|    Max cumulative indexing throttle time across primary shards |                          |          0 |    min |
|                        Cumulative merge time of primary shards |                          |     106.23 |    min |
|                       Cumulative merge count of primary shards |                          |       5501 |        |
|                Min cumulative merge time across primary shards |                          |      1.483 |    min |
|             Median cumulative merge time across primary shards |                          |    2.08153 |    min |
|                Max cumulative merge time across primary shards |                          |    3.03922 |    min |
|               Cumulative merge throttle time of primary shards |                          |    19.7606 |    min |
|       Min cumulative merge throttle time across primary shards |                          |   0.126833 |    min |
|    Median cumulative merge throttle time across primary shards |                          |   0.365067 |    min |
|       Max cumulative merge throttle time across primary shards |                          |   0.733183 |    min |
|                      Cumulative refresh time of primary shards |                          |     72.694 |    min |
|                     Cumulative refresh count of primary shards |                          |      48698 |        |
|              Min cumulative refresh time across primary shards |                          |    1.01737 |    min |
|           Median cumulative refresh time across primary shards |                          |    1.49204 |    min |
|              Max cumulative refresh time across primary shards |                          |    1.82725 |    min |
|                        Cumulative flush time of primary shards |                          |   0.847967 |    min |
|                       Cumulative flush count of primary shards |                          |        225 |        |
|                Min cumulative flush time across primary shards |                          | 0.00361667 |    min |
|             Median cumulative flush time across primary shards |                          |  0.0132333 |    min |
|                Max cumulative flush time across primary shards |                          |  0.0606333 |    min |
|                                        Total Young Gen GC time |                          |    342.525 |      s |
|                                       Total Young Gen GC count |                          |      25299 |        |
|                                          Total Old Gen GC time |                          |          0 |      s |
|                                         Total Old Gen GC count |                          |          0 |        |
|                                                     Store size |                          |    68.9203 |     GB |
|                                                  Translog size |                          |   0.120647 |     GB |
|                                         Heap used for segments |                          |          0 |     MB |
|                                       Heap used for doc values |                          |          0 |     MB |
|                                            Heap used for terms |                          |          0 |     MB |
|                                            Heap used for norms |                          |          0 |     MB |
|                                           Heap used for points |                          |          0 |     MB |
|                                    Heap used for stored fields |                          |          0 |     MB |
|                                                  Segment count |                          |        973 |        |
|                                                 Min Throughput |                    index |    41312.5 | docs/s |
|                                                Mean Throughput |                    index |      58719 | docs/s |
|                                              Median Throughput |                    index |    61717.6 | docs/s |
|                                                 Max Throughput |                    index |    62852.4 | docs/s |
|                                        50th percentile latency |                    index |    1193.44 |     ms |
|                                        90th percentile latency |                    index |    1438.53 |     ms |
|                                        99th percentile latency |                    index |    1732.63 |     ms |
|                                      99.9th percentile latency |                    index |    8818.15 |     ms |
|                                     99.99th percentile latency |                    index |    11353.2 |     ms |
|                                       100th percentile latency |                    index |    11675.6 |     ms |
|                                   50th percentile service time |                    index |    1193.44 |     ms |
|                                   90th percentile service time |                    index |    1438.53 |     ms |
|                                   99th percentile service time |                    index |    1732.63 |     ms |
|                                 99.9th percentile service time |                    index |    8818.15 |     ms |
|                                99.99th percentile service time |                    index |    11353.2 |     ms |
|                                  100th percentile service time |                    index |    11675.6 |     ms |
|                                                     error rate |                    index |          0 |      % |
|                                                 Min Throughput | wait-until-merges-finish |      18.41 |  ops/s |
|                                                Mean Throughput | wait-until-merges-finish |      18.41 |  ops/s |
|                                              Median Throughput | wait-until-merges-finish |      18.41 |  ops/s |
|                                                 Max Throughput | wait-until-merges-finish |      18.41 |  ops/s |
|                                        50th percentile latency | wait-until-merges-finish |            |        |
|                                        90th percentile latency | wait-until-merges-finish |            |        |
|                                        99th percentile latency | wait-until-merges-finish |            |        |
|                                      99.9th percentile latency | wait-until-merges-finish |            |        |
|                                     99.99th percentile latency | wait-until-merges-finish |            |        |
|                                       100th percentile latency | wait-until-merges-finish |    53.8539 |     ms |
|                                   50th percentile service time | wait-until-merges-finish |            |        |
|                                   90th percentile service time | wait-until-merges-finish |            |        |
|                                   99th percentile service time | wait-until-merges-finish |            |        |
|                                 99.9th percentile service time | wait-until-merges-finish |            |        |
|                                99.99th percentile service time | wait-until-merges-finish |            |        |
|                                  100th percentile service time | wait-until-merges-finish |    53.8539 |     ms |
|                                                     error rate | wait-until-merges-finish |          0 |      % |
|                                                 Min Throughput |                  default |       3.01 |  ops/s |
|                                                Mean Throughput |                  default |       3.02 |  ops/s |
|                                              Median Throughput |                  default |       3.02 |  ops/s |
|                                                 Max Throughput |                  default |       3.04 |  ops/s |
|                                        50th percentile latency |                  default |    10.6608 |     ms |
|                                        90th percentile latency |                  default |    11.5276 |     ms |
|                                        99th percentile latency |                  default |     16.646 |     ms |
|                                      99.9th percentile latency |                  default |            |        |
|                                     99.99th percentile latency |                  default |            |        |
|                                       100th percentile latency |                  default |    22.9773 |     ms |
|                                   50th percentile service time |                  default |    9.37671 |     ms |
|                                   90th percentile service time |                  default |    9.86004 |     ms |
|                                   99th percentile service time |                  default |    15.7949 |     ms |
|                                 99.9th percentile service time |                  default |            |        |
|                                99.99th percentile service time |                  default |            |        |
|                                  100th percentile service time |                  default |    21.8315 |     ms |
|                                                     error rate |                  default |          0 |      % |
|                                                 Min Throughput |                    range |        0.7 |  ops/s |
|                                                Mean Throughput |                    range |       0.71 |  ops/s |
|                                              Median Throughput |                    range |       0.71 |  ops/s |
|                                                 Max Throughput |                    range |       0.71 |  ops/s |
|                                        50th percentile latency |                    range |    47.3249 |     ms |
|                                        90th percentile latency |                    range |    50.6864 |     ms |
|                                        99th percentile latency |                    range |    58.6657 |     ms |
|                                      99.9th percentile latency |                    range |            |        |
|                                     99.99th percentile latency |                    range |            |        |
|                                       100th percentile latency |                    range |    61.4277 |     ms |
|                                   50th percentile service time |                    range |    45.0459 |     ms |
|                                   90th percentile service time |                    range |    48.3242 |     ms |
|                                   99th percentile service time |                    range |    56.2852 |     ms |
|                                 99.9th percentile service time |                    range |            |        |
|                                99.99th percentile service time |                    range |            |        |
|                                  100th percentile service time |                    range |    59.3888 |     ms |
|                                                     error rate |                    range |          0 |      % |
|                                                 Min Throughput |      distance_amount_agg |       2.01 |  ops/s |
|                                                Mean Throughput |      distance_amount_agg |       2.02 |  ops/s |
|                                              Median Throughput |      distance_amount_agg |       2.02 |  ops/s |
|                                                 Max Throughput |      distance_amount_agg |       2.03 |  ops/s |
|                                        50th percentile latency |      distance_amount_agg |     10.037 |     ms |
|                                        90th percentile latency |      distance_amount_agg |      10.88 |     ms |
|                                        99th percentile latency |      distance_amount_agg |    11.7421 |     ms |
|                                      99.9th percentile latency |      distance_amount_agg |            |        |
|                                     99.99th percentile latency |      distance_amount_agg |            |        |
|                                       100th percentile latency |      distance_amount_agg |    11.7583 |     ms |
|                                   50th percentile service time |      distance_amount_agg |    8.57937 |     ms |
|                                   90th percentile service time |      distance_amount_agg |    9.15486 |     ms |
|                                   99th percentile service time |      distance_amount_agg |     9.6672 |     ms |
|                                 99.9th percentile service time |      distance_amount_agg |            |        |
|                                99.99th percentile service time |      distance_amount_agg |            |        |
|                                  100th percentile service time |      distance_amount_agg |    10.2612 |     ms |
|                                                     error rate |      distance_amount_agg |          0 |      % |
|                                                 Min Throughput |            autohisto_agg |       1.49 |  ops/s |
|                                                Mean Throughput |            autohisto_agg |        1.5 |  ops/s |
|                                              Median Throughput |            autohisto_agg |        1.5 |  ops/s |
|                                                 Max Throughput |            autohisto_agg |        1.5 |  ops/s |
|                                        50th percentile latency |            autohisto_agg |    86.4107 |     ms |
|                                        90th percentile latency |            autohisto_agg |    89.5087 |     ms |
|                                        99th percentile latency |            autohisto_agg |    104.545 |     ms |
|                                      99.9th percentile latency |            autohisto_agg |            |        |
|                                     99.99th percentile latency |            autohisto_agg |            |        |
|                                       100th percentile latency |            autohisto_agg |    106.246 |     ms |
|                                   50th percentile service time |            autohisto_agg |    84.8393 |     ms |
|                                   90th percentile service time |            autohisto_agg |    87.6601 |     ms |
|                                   99th percentile service time |            autohisto_agg |    102.725 |     ms |
|                                 99.9th percentile service time |            autohisto_agg |            |        |
|                                99.99th percentile service time |            autohisto_agg |            |        |
|                                  100th percentile service time |            autohisto_agg |    104.866 |     ms |
|                                                     error rate |            autohisto_agg |          0 |      % |
|                                                 Min Throughput |       date_histogram_agg |       1.51 |  ops/s |
|                                                Mean Throughput |       date_histogram_agg |       1.51 |  ops/s |
|                                              Median Throughput |       date_histogram_agg |       1.51 |  ops/s |
|                                                 Max Throughput |       date_histogram_agg |       1.52 |  ops/s |
|                                        50th percentile latency |       date_histogram_agg |    85.0481 |     ms |
|                                        90th percentile latency |       date_histogram_agg |    88.5936 |     ms |
|                                        99th percentile latency |       date_histogram_agg |    99.9323 |     ms |
|                                      99.9th percentile latency |       date_histogram_agg |            |        |
|                                     99.99th percentile latency |       date_histogram_agg |            |        |
|                                       100th percentile latency |       date_histogram_agg |    107.294 |     ms |
|                                   50th percentile service time |       date_histogram_agg |    83.5278 |     ms |
|                                   90th percentile service time |       date_histogram_agg |    86.4779 |     ms |
|                                   99th percentile service time |       date_histogram_agg |    98.4189 |     ms |
|                                 99.9th percentile service time |       date_histogram_agg |            |        |
|                                99.99th percentile service time |       date_histogram_agg |            |        |
|                                  100th percentile service time |       date_histogram_agg |    105.575 |     ms |
|                                                     error rate |       date_histogram_agg |          0 |      % |

Comparison

Without primary balance is used as baseline and run with prefer_primary setting to true as contender.

ubuntu@ip-172-31-49-145:~/OpenSearch-Benchmark$ opensearch-benchmark compare --baseline=98dede48-2c5e-4427-bcd4-e6af919e2b1b  --contender=54389b8b-20c7-453f-ba92-0bf5a3084fd0

   ____                  _____                      __       ____                  __                         __
  / __ \____  ___  ____ / ___/___  ____ ___________/ /_     / __ )___  ____  _____/ /_  ____ ___  ____ ______/ /__
 / / / / __ \/ _ \/ __ \\__ \/ _ \/ __ `/ ___/ ___/ __ \   / __  / _ \/ __ \/ ___/ __ \/ __ `__ \/ __ `/ ___/ //_/
/ /_/ / /_/ /  __/ / / /__/ /  __/ /_/ / /  / /__/ / / /  / /_/ /  __/ / / / /__/ / / / / / / / / /_/ / /  / ,<
\____/ .___/\___/_/ /_/____/\___/\__,_/_/   \___/_/ /_/  /_____/\___/_/ /_/\___/_/ /_/_/ /_/ /_/\__,_/_/  /_/|_|
    /_/


Comparing baseline
  TestExecution ID: 98dede48-2c5e-4427-bcd4-e6af919e2b1b
  TestExecution timestamp: 2023-03-14 04:25:19
  TestProcedure: append-no-conflicts
  ProvisionConfigInstance: external

with contender
  TestExecution ID: 54389b8b-20c7-453f-ba92-0bf5a3084fd0
  TestExecution timestamp: 2023-03-14 03:29:21
  TestProcedure: append-no-conflicts
  ProvisionConfigInstance: external

------------------------------------------------------
    _______             __   _____
   / ____(_)___  ____ _/ /  / ___/_________  ________
  / /_  / / __ \/ __ `/ /   \__ \/ ___/ __ \/ ___/ _ \
 / __/ / / / / / /_/ / /   ___/ / /__/ /_/ / /  /  __/
/_/   /_/_/ /_/\__,_/_/   /____/\___/\____/_/   \___/
------------------------------------------------------

|                                                        Metric |                     Task |   Baseline |   Contender |     Diff |   Unit |
|--------------------------------------------------------------:|-------------------------:|-----------:|------------:|---------:|-------:|
|                    Cumulative indexing time of primary shards |                          |    167.244 |     167.079 | -0.16493 |    min |
|             Min cumulative indexing time across primary shard |                          |    2.25197 |     2.64763 |  0.39567 |    min |
|          Median cumulative indexing time across primary shard |                          |    3.36518 |     3.37325 |  0.00807 |    min |
|             Max cumulative indexing time across primary shard |                          |    4.03253 |     4.00903 |  -0.0235 |    min |
|           Cumulative indexing throttle time of primary shards |                          |          0 |           0 |        0 |    min |
|    Min cumulative indexing throttle time across primary shard |                          |          0 |           0 |        0 |    min |
| Median cumulative indexing throttle time across primary shard |                          |          0 |           0 |        0 |    min |
|    Max cumulative indexing throttle time across primary shard |                          |          0 |           0 |        0 |    min |
|                       Cumulative merge time of primary shards |                          |    94.5642 |      106.23 |  11.6654 |    min |
|                      Cumulative merge count of primary shards |                          |       5463 |        5501 |       38 |        |
|                Min cumulative merge time across primary shard |                          |    1.31985 |       1.483 |  0.16315 |    min |
|             Median cumulative merge time across primary shard |                          |    1.87408 |     2.08153 |  0.20746 |    min |
|                Max cumulative merge time across primary shard |                          |    2.71783 |     3.03922 |  0.32138 |    min |
|              Cumulative merge throttle time of primary shards |                          |    17.8315 |     19.7606 |  1.92915 |    min |
|       Min cumulative merge throttle time across primary shard |                          |    0.12735 |    0.126833 | -0.00052 |    min |
|    Median cumulative merge throttle time across primary shard |                          |   0.372908 |    0.365067 | -0.00784 |    min |
|       Max cumulative merge throttle time across primary shard |                          |   0.689233 |    0.733183 |  0.04395 |    min |
|                     Cumulative refresh time of primary shards |                          |    71.0345 |      72.694 |  1.65948 |    min |
|                    Cumulative refresh count of primary shards |                          |      47771 |       48698 |      927 |        |
|              Min cumulative refresh time across primary shard |                          |   0.909167 |     1.01737 |   0.1082 |    min |
|           Median cumulative refresh time across primary shard |                          |    1.47808 |     1.49204 |  0.01397 |    min |
|              Max cumulative refresh time across primary shard |                          |    1.73413 |     1.82725 |  0.09312 |    min |
|                       Cumulative flush time of primary shards |                          |   0.761017 |    0.847967 |  0.08695 |    min |
|                      Cumulative flush count of primary shards |                          |        223 |         225 |        2 |        |
|                Min cumulative flush time across primary shard |                          | 0.00308333 |  0.00361667 |  0.00053 |    min |
|             Median cumulative flush time across primary shard |                          |   0.012725 |   0.0132333 |  0.00051 |    min |
|                Max cumulative flush time across primary shard |                          |  0.0527833 |   0.0606333 |  0.00785 |    min |
|                                       Total Young Gen GC time |                          |    296.221 |     342.525 |   46.304 |      s |
|                                      Total Young Gen GC count |                          |      21785 |       25299 |     3514 |        |
|                                         Total Old Gen GC time |                          |          0 |           0 |        0 |      s |
|                                        Total Old Gen GC count |                          |          0 |           0 |        0 |        |
|                                                    Store size |                          |    69.0933 |     68.9203 | -0.17303 |     GB |
|                                                 Translog size |                          |   0.491367 |    0.120647 | -0.37072 |     GB |
|                                        Heap used for segments |                          |          0 |           0 |        0 |     MB |
|                                      Heap used for doc values |                          |          0 |           0 |        0 |     MB |
|                                           Heap used for terms |                          |          0 |           0 |        0 |     MB |
|                                           Heap used for norms |                          |          0 |           0 |        0 |     MB |
|                                          Heap used for points |                          |          0 |           0 |        0 |     MB |
|                                   Heap used for stored fields |                          |          0 |           0 |        0 |     MB |
|                                                 Segment count |                          |        957 |         973 |       16 |        |
|                                                Min Throughput |                    index |    44163.8 |     41312.5 | -2851.27 | docs/s |
|                                               Mean Throughput |                    index |    56094.8 |       58719 |   2624.2 | docs/s |
|                                             Median Throughput |                    index |    57972.2 |     61717.5 |  3745.37 | docs/s |
|                                                Max Throughput |                    index |    61174.3 |     62852.4 |  1678.09 | docs/s |
|                                       50th percentile latency |                    index |    1207.63 |     1193.44 | -14.1939 |     ms |
|                                       90th percentile latency |                    index |    1437.44 |     1438.53 |  1.09636 |     ms |
|                                       99th percentile latency |                    index |    1882.52 |     1732.63 | -149.887 |     ms |
|                                     99.9th percentile latency |                    index |    14283.5 |     8818.15 | -5465.35 |     ms |
|                                    99.99th percentile latency |                    index |      16504 |     11353.2 | -5150.81 |     ms |
|                                      100th percentile latency |                    index |      16601 |     11675.6 | -4925.39 |     ms |
|                                  50th percentile service time |                    index |    1207.63 |     1193.44 | -14.1939 |     ms |
|                                  90th percentile service time |                    index |    1437.44 |     1438.53 |  1.09636 |     ms |
|                                  99th percentile service time |                    index |    1882.52 |     1732.63 | -149.887 |     ms |
|                                99.9th percentile service time |                    index |    14283.5 |     8818.15 | -5465.35 |     ms |
|                               99.99th percentile service time |                    index |      16504 |     11353.2 | -5150.81 |     ms |
|                                 100th percentile service time |                    index |      16601 |     11675.6 | -4925.39 |     ms |
|                                                    error rate |                    index |          0 |           0 |        0 |      % |
|                                                Min Throughput | wait-until-merges-finish |    12.8647 |     18.4142 |  5.54954 |  ops/s |
|                                               Mean Throughput | wait-until-merges-finish |    12.8647 |     18.4142 |  5.54954 |  ops/s |
|                                             Median Throughput | wait-until-merges-finish |    12.8647 |     18.4142 |  5.54954 |  ops/s |
|                                                Max Throughput | wait-until-merges-finish |    12.8647 |     18.4142 |  5.54954 |  ops/s |
|                                      100th percentile latency | wait-until-merges-finish |    77.4571 |     53.8539 | -23.6032 |     ms |
|                                 100th percentile service time | wait-until-merges-finish |    77.4571 |     53.8539 | -23.6032 |     ms |
|                                                    error rate | wait-until-merges-finish |          0 |           0 |        0 |      % |
|                                                Min Throughput |                  default |    3.01318 |     3.01391 |  0.00074 |  ops/s |
|                                               Mean Throughput |                  default |    3.02141 |     3.02266 |  0.00125 |  ops/s |
|                                             Median Throughput |                  default |    3.01947 |     3.02063 |  0.00117 |  ops/s |
|                                                Max Throughput |                  default |    3.03777 |     3.03993 |  0.00215 |  ops/s |
|                                       50th percentile latency |                  default |    10.8131 |     10.6608 | -0.15227 |     ms |
|                                       90th percentile latency |                  default |    11.4907 |     11.5276 |  0.03688 |     ms |
|                                       99th percentile latency |                  default |    19.0599 |      16.646 | -2.41386 |     ms |
|                                      100th percentile latency |                  default |     21.325 |     22.9773 |  1.65237 |     ms |
|                                  50th percentile service time |                  default |    9.35042 |     9.37671 |  0.02629 |     ms |
|                                  90th percentile service time |                  default |    9.70569 |     9.86004 |  0.15435 |     ms |
|                                  99th percentile service time |                  default |    17.5502 |     15.7949 | -1.75525 |     ms |
|                                 100th percentile service time |                  default |    20.3465 |     21.8315 |  1.48505 |     ms |
|                                                    error rate |                  default |          0 |           0 |        0 |      % |
|                                                Min Throughput |                    range |   0.703693 |    0.703782 |    9e-05 |  ops/s |
|                                               Mean Throughput |                    range |   0.706073 |    0.706225 |  0.00015 |  ops/s |
|                                             Median Throughput |                    range |   0.705525 |    0.705663 |  0.00014 |  ops/s |
|                                                Max Throughput |                    range |   0.710971 |    0.711248 |  0.00028 |  ops/s |
|                                       50th percentile latency |                    range |    46.4898 |     47.3249 |  0.83508 |     ms |
|                                       90th percentile latency |                    range |    49.2596 |     50.6864 |  1.42677 |     ms |
|                                       99th percentile latency |                    range |    53.4006 |     58.6657 |  5.26513 |     ms |
|                                      100th percentile latency |                    range |    63.1883 |     61.4277 | -1.76059 |     ms |
|                                  50th percentile service time |                    range |    44.0009 |     45.0459 |  1.04498 |     ms |
|                                  90th percentile service time |                    range |    46.8863 |     48.3242 |  1.43789 |     ms |
|                                  99th percentile service time |                    range |    50.7681 |     56.2852 |  5.51712 |     ms |
|                                 100th percentile service time |                    range |    60.5396 |     59.3888 | -1.15083 |     ms |
|                                                    error rate |                    range |          0 |           0 |        0 |      % |
|                                                Min Throughput |      distance_amount_agg |    2.00837 |     2.01047 |  0.00209 |  ops/s |
|                                               Mean Throughput |      distance_amount_agg |    2.01376 |     2.01719 |  0.00343 |  ops/s |
|                                             Median Throughput |      distance_amount_agg |    2.01251 |     2.01563 |  0.00312 |  ops/s |
|                                                Max Throughput |      distance_amount_agg |    2.02468 |     2.03089 |  0.00621 |  ops/s |
|                                       50th percentile latency |      distance_amount_agg |     9.3383 |      10.037 |  0.69868 |     ms |
|                                       90th percentile latency |      distance_amount_agg |    9.74717 |       10.88 |  1.13281 |     ms |
|                                       99th percentile latency |      distance_amount_agg |    10.8088 |     11.7421 |  0.93338 |     ms |
|                                      100th percentile latency |      distance_amount_agg |    16.5493 |     11.7583 |   -4.791 |     ms |
|                                  50th percentile service time |      distance_amount_agg |    7.71017 |     8.57937 |   0.8692 |     ms |
|                                  90th percentile service time |      distance_amount_agg |    8.14001 |     9.15486 |  1.01485 |     ms |
|                                  99th percentile service time |      distance_amount_agg |    9.10277 |      9.6672 |  0.56442 |     ms |
|                                 100th percentile service time |      distance_amount_agg |      14.97 |     10.2612 | -4.70874 |     ms |
|                                                    error rate |      distance_amount_agg |          0 |           0 |        0 |      % |
|                                                Min Throughput |            autohisto_agg |    1.50259 |     1.49119 |  -0.0114 |  ops/s |
|                                               Mean Throughput |            autohisto_agg |     1.5042 |     1.49508 | -0.00912 |  ops/s |
|                                             Median Throughput |            autohisto_agg |    1.50384 |     1.49553 | -0.00832 |  ops/s |
|                                                Max Throughput |            autohisto_agg |    1.50741 |     1.49699 | -0.01042 |  ops/s |
|                                       50th percentile latency |            autohisto_agg |    85.8957 |     86.4107 |  0.51501 |     ms |
|                                       90th percentile latency |            autohisto_agg |    89.5563 |     89.5087 | -0.04755 |     ms |
|                                       99th percentile latency |            autohisto_agg |     101.67 |     104.545 |  2.87505 |     ms |
|                                      100th percentile latency |            autohisto_agg |    105.357 |     106.246 |  0.88826 |     ms |
|                                  50th percentile service time |            autohisto_agg |    84.2711 |     84.8393 |  0.56824 |     ms |
|                                  90th percentile service time |            autohisto_agg |    87.4972 |     87.6601 |  0.16288 |     ms |
|                                  99th percentile service time |            autohisto_agg |    99.9547 |     102.725 |  2.77041 |     ms |
|                                 100th percentile service time |            autohisto_agg |    104.099 |     104.866 |  0.76625 |     ms |
|                                                    error rate |            autohisto_agg |          0 |           0 |        0 |      % |
|                                                Min Throughput |       date_histogram_agg |    1.50807 |     1.50833 |  0.00026 |  ops/s |
|                                               Mean Throughput |       date_histogram_agg |    1.51333 |     1.51377 |  0.00044 |  ops/s |
|                                             Median Throughput |       date_histogram_agg |    1.51214 |     1.51254 |   0.0004 |  ops/s |
|                                                Max Throughput |       date_histogram_agg |    1.52397 |     1.52478 |  0.00081 |  ops/s |
|                                       50th percentile latency |       date_histogram_agg |    83.5381 |     85.0481 |  1.51002 |     ms |
|                                       90th percentile latency |       date_histogram_agg |    87.1894 |     88.5936 |  1.40419 |     ms |
|                                       99th percentile latency |       date_histogram_agg |    90.2307 |     99.9323 |  9.70161 |     ms |
|                                      100th percentile latency |       date_histogram_agg |    91.7875 |     107.294 |  15.5062 |     ms |
|                                  50th percentile service time |       date_histogram_agg |    82.0609 |     83.5278 |  1.46694 |     ms |
|                                  90th percentile service time |       date_histogram_agg |    85.4402 |     86.4779 |  1.03768 |     ms |
|                                  99th percentile service time |       date_histogram_agg |    88.1987 |     98.4189 |  10.2202 |     ms |
|                                 100th percentile service time |       date_histogram_agg |     90.287 |     105.575 |  15.2879 |     ms |
|                                                    error rate |       date_histogram_agg |          0 |           0 |        0 |      % |

* balance per index and across all indices is maintained.
* @throws Exception
*/
public void testGlobalPrimaryAllocation() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

Should we also add a test case here for allocation/rebalance post failover with these constraints? To simulate rebalance when a shard comes back full of replicas.

Copy link
Member Author

@dreamer-89 dreamer-89 Mar 15, 2023

Choose a reason for hiding this comment

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

Re-balancing is only performed at per index level today. So, allocation on a multiple index failover scenario wouldn't be predictible. The per index allocation/rebalancing scenario is covered in existing ITs. The global re-balancing is tracked in #6642

Copy link
Member

@mch2 mch2 left a comment

Choose a reason for hiding this comment

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

LGTM @dreamer-89, thanks for this change and providing all the perf benchmarks.

@dreamer-89 dreamer-89 merged commit ad823b6 into opensearch-project:main Mar 15, 2023
@dreamer-89 dreamer-89 added the backport 2.x Backport to 2.x branch label Mar 15, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 15, 2023
…ing allocation (#6643)

* [Segment Replication] Add global primary shard balance constraint during allocation

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add javadoc

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Fix testAllConstraints test to include all constraints

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
(cherry picked from commit ad823b6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dreamer-89 pushed a commit that referenced this pull request Mar 15, 2023
…ing allocation (#6643) (#6690)

* [Segment Replication] Add global primary shard balance constraint during allocation



* Add javadoc



* Fix testAllConstraints test to include all constraints



---------


(cherry picked from commit ad823b6)

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mingshl pushed a commit to mingshl/OpenSearch-Mingshl that referenced this pull request Mar 24, 2023
…ing allocation (opensearch-project#6643)

* [Segment Replication] Add global primary shard balance constraint during allocation

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add javadoc

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Fix testAllConstraints test to include all constraints

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants