Skip to content

Commit 612d556

Browse files
authored
DOC-13246: Updates after review (#882)
1 parent 0887149 commit 612d556

4 files changed

Lines changed: 15 additions & 19 deletions

File tree

modules/ROOT/pages/index-partitions.adoc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include::partial$_show_page_header_block.adoc[]
1515

1616
Partitioned indexes in Sync Gateway offer horizontal scalability for large deployments by sharding indexes across multiple nodes.
1717
This can decrease performance, as each partition is queried separately and results are aggregated.
18-
Only `allDocs` and channels indexes can be partitioned.
18+
Only `allDocs` and `channels` indexes can be partitioned.
1919

2020
[#when-to-use]
2121
== When to Use Partitioned Indexes
@@ -55,10 +55,7 @@ The size of Sync Gateway's indexes is correlated to:
5555
* The number of documents in a collection.
5656
* The number of channels each document is assigned to.
5757

58-
If index size is a concern, your first approach should be to:
59-
60-
* Split documents across multiple collections.
61-
* Review and minimize channel fan-out.
58+
If index size is a concern, your first approach should be to split documents across multiple collections.
6259

6360
Query performance is sensitive to channel design.
6461
Systems with many small channels tend to perform worse than those using fewer, larger channels.
@@ -86,7 +83,7 @@ The advantage is no downtime; the disadvantage is temporarily higher resource us
8683

8784
. Wait for completion via xref:rest_api_admin_static.adoc#tag/Database-Management/operation/get_db-_index_init[`GET /{db}/_index_init`].
8885

89-
. Run xref:rest_api_admin_static.adoc#tag/Database-Configuration/operation/post_db-_config[`POST /{db}/_config`] to use new indexes.
86+
. Run xref:rest_api_admin_static.adoc#tag/Database-Configuration/operation/post_db-_config[`POST /{db}/_config`] with `index.num_partitions` updated in the configuration to use new indexes.
9087

9188
. Run xref:rest_api_admin_static.adoc#tag/Server/operation/post__post_upgrade[`POST /_post_upgrade`] to remove old indexes.
9289

@@ -143,7 +140,7 @@ If your deployment uses xref:configuration-overview.adoc#lbl-config-grp[Configur
143140
Misalignment between config groups can lead to unexpected deletion of active indexes if xref:rest_api_admin_static.adoc#tag/Server/operation/post__post_upgrade[`POST /_post_upgrade`] is run.
144141
This will result in:
145142

146-
* Doing a CBS sequential scan on the Query nodes, which will seriously degrade performance of Query nodes.
143+
* Couchbase Server (version 7.6 and later) falling back on a sequential scan of the Query nodes, which will seriously degrade Query performance.
147144

148145
* Recreating indexes that were deleted by another config when a node is rebooted with a different `index.num_partitions`, even after xref:rest_api_admin_static.adoc#tag/Server/operation/post__post_upgrade[`POST /_post_upgrade`] is run.
149146

@@ -155,9 +152,9 @@ This will result in:
155152

156153
To identify the current index configuration, you can:
157154

158-
* Use xref:rest_api_admin_static.adoc#tag/Database-Management/operation/get_db-_index_init[`GET /{db}/_index_init`] to verify the `settings.num_partitions` in use.
155+
* Use xref:rest_api_admin_static.adoc#tag/Database-Configuration/operation/get_db-_config[`GET /{db}/_config`] to check the active configuration in `index.num_partitions`.
159156

160-
* Use xref:rest_api_admin_static.adoc#tag/Database-Configuration/operation/get_db-_config[`GET /{db}/_config`] to check the active configuration.
157+
* Use xref:rest_api_admin_static.adoc#tag/Database-Management/operation/get_db-_index_init[`GET /{db}/_index_init`] to see if there is an index creation in progress.
161158

162159
[#failures]
163160
=== Identify Failures

modules/ROOT/pages/indexing.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ Sync Gateway 3.3 supports partitioned indexes.
2121
This enables you to divide and spread a large index across multiple nodes.
2222
For details, see xref:index-partitions.adoc[].
2323

24-
Sync Gateway 2.1 and earlier used system Views instead.
25-
You can continue to define views through the xref:rest_api_admin.adoc#tag/Unsupported[Sync Gateway Admin REST API], but this feature is unsupported.
26-
2724
== Configuration
2825
This capability is enabled by default and is supported by two properties in the configuration file which can be adjusted:
2926

modules/ROOT/pages/upgrading.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ When Sync Gateway starts, it will publish a Design Document which contains the V
274274
"channels":{
275275
"map":"function (doc, meta) { ... }"
276276
},
277-
...
277+
// ...
278278
},
279279
"index_xattr_on_deleted_docs":true
280280
}
@@ -306,7 +306,7 @@ $ curl -X PUT http://localhost:8092/<BUCKET_NAME>/_design/dev_sync_gateway/ -d @
306306

307307
This should return:
308308

309-
[source,bash]
309+
[source,json]
310310
----
311311
{"ok":true,"id":"_design/dev_sync_gateway"}
312312
----
@@ -671,12 +671,14 @@ It is recommended to test the upgrade on a staging environment before upgrading
671671

672672
The known issue xref:release-notes.adoc#2-5-0[CBG-394], means that the upgrade will *require downtime* when enabling shared bucket access on an existing deployment that is running with GSI indexing. This is to allow all documents to migrate, using index-based data requests whilst migration is in progress could result in an incomplete data set being returned (containing only those docs migrated at the time of the request). You are advised to schedule a maintenance window to allow time for migration to complete.
673673

674-
| *Sync Gateway 2.1 or above*
675-
`index.num_replicas: 1`
676-
| *Sync Gateway 2.1 or above*
674+
| *Sync Gateway 2.1 to 3.2*
675+
`num_index_replicas: 2` (or n)
676+
| *Sync Gateway 3.3 or later*
677677
`index.num_replicas: 2` (or n)
678678
2+|
679679
After restarting Sync Gateway with the updated configuration file, the number of Index Replicas in the Couchbase Server cluster is automatically updated.
680+
681+
As of Sync Gateway 3.3, `num_index_replicas` still works, but this option has been deprecated in favor of `index.num_replicas`.
680682
|===
681683

682684
== Migrating from Bucket Shadowing

modules/ROOT/pages/whatsnew.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ include::partial$block-caveats.adoc[tags=eventing-mixed-mode]
2626

2727
Sync Gateway 3.3 introduces support for partitioned indexes.
2828
Partitioned indexes offer horizontal scalability for large deployments by sharding indexes across multiple nodes.
29-
Only `allDocs` and channels indexes can be partitioned.
29+
Only `allDocs` and `channels` indexes can be partitioned.
3030

3131
Partitioned indexes are not intended for general use in Sync Gateway.
3232
They may decrease performance, as each partition is queried separately and results are aggregated.
@@ -41,7 +41,7 @@ Sync Gateway 3.3 introduces an option to disable the xref:rest_api_public.adoc#t
4141
That operation is intended mainly for debugging in a small setup.
4242
With a large number of documents, it may lead to timeouts and out-of-memory conditions on the Query nodes.
4343

44-
In any sizeable setup, it is recommended that you should instead use the xref:rest_api_public.adoc#tag/Database-Management/operation/get_keyspace-_changes[`GET /{keyspace}/_changes`] operation to get all documents for a user, or the xref:rest_api_public.adoc#tag/Document/operation/post_keyspace-_bulk_docs[`POST /{keyspace}/_bulk_docs`] operation to return any number of documents.
44+
In any sizeable setup, it is recommended that you should instead use the xref:rest_api_public.adoc#tag/Database-Management/operation/get_keyspace-_changes[`GET /{keyspace}/_changes`] operation to get all documents for a user, or the xref:rest_api_public.adoc#tag/Document/operation/post_keyspace-_bulk_docs[`POST /{keyspace}/_bulk_docs`] operation to return a specific subset of documents.
4545

4646
To disable the xref:rest_api_public.adoc#tag/Document/operation/get_keyspace-_all_docs[`GET /{keyspace}/_all_docs`] operation in the Public REST API, set xref:configuration-schema-database.adoc#disable_public_all_docs[`disable_public_all_docs`] to `true` in the database configuration.
4747
This option is set to `false` by default; it will be set to `true` by default in a future release.

0 commit comments

Comments
 (0)