Skip to content

Commit 2b30ea2

Browse files
committed
PCSM-219: Undo README changes
1 parent 1ae84b6 commit 2b30ea2

File tree

1 file changed

+13
-74
lines changed

1 file changed

+13
-74
lines changed

README.md

Lines changed: 13 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,12 @@ curl http://localhost:2242/status
145145

146146
When starting the PCSM server, you can use the following options:
147147

148-
| Option | CLI Flag | Default | Description |
149-
|----------------------------------|------------------------------------|---------|--------------------------------------|
150-
| Port | `--port` | 2242 | Port on which the server listens |
151-
| Source URI | `--source` | - | MongoDB connection string for source |
152-
| Target URI | `--target` | - | MongoDB connection string for target |
153-
| Log Level | `--log-level` | info | Log level (trace/debug/info/warn/error/fatal/panic) |
154-
| Log JSON | `--log-json` | false | Output log in JSON format |
155-
| No Color | `--no-color` | false | Disable log ASCII color |
156-
| MongoDB Operation Timeout | `--mongodb-cli-operation-timeout` | 5m | Timeout for MongoDB operations |
148+
- `--port`: The port on which the server will listen (default: 2242)
149+
- `--source`: The MongoDB connection string for the source cluster
150+
- `--target`: The MongoDB connection string for the target cluster
151+
- `--log-level`: The log level (default: "info")
152+
- `--log-json`: Output log in JSON format with disabled color
153+
- `--no-color`: Disable log ASCI color
157154

158155
Example:
159156

@@ -163,52 +160,14 @@ bin/pcsm \
163160
--target <target-mongodb-uri> \
164161
--port 2242 \
165162
--log-level debug \
166-
--log-json \
167-
--mongodb-cli-operation-timeout 10m
163+
--log-json
168164
```
169165

170166
## Environment Variables
171167

172-
The following environment variables are supported:
173-
174-
| Option | Env Var | Default | Description |
175-
|----------------------------|--------------------------------------|---------|--------------------------------------|
176-
| Source URI | `PCSM_SOURCE_URI` | - | MongoDB connection string for source |
177-
| Target URI | `PCSM_TARGET_URI` | - | MongoDB connection string for target |
178-
| Port | `PCSM_PORT` | 2242 | Port on which the server listens |
179-
| Log Level | `PCSM_LOG_LEVEL` | info | Log level |
180-
| Log JSON | `PCSM_LOG_JSON` | false | Output log in JSON format |
181-
| No Color | `PCSM_NO_COLOR` | false | Disable log ASCII color |
182-
| MongoDB Operation Timeout | `PCSM_MONGODB_CLI_OPERATION_TIMEOUT` | 5m | Timeout for MongoDB operations |
183-
| Use Collection Bulk Write | `PCSM_USE_COLLECTION_BULK_WRITE` | false | Use collection-level bulk write (internal) |
184-
185-
> **Note**: Clone tuning options (see below) are intentionally NOT supported via environment variables. They are configurable via CLI flags and HTTP request parameters only.
186-
187-
## Clone Tuning Options
188-
189-
Advanced tuning options for the clone process. These are available via CLI flags
190-
and HTTP request parameters, but NOT via environment variables.
191-
192-
| CLI Flag | HTTP Parameter | Default | Range | Description |
193-
|------------------------------------|-------------------------------|----------|-------------|------------------------------------|
194-
| `--clone-num-parallel-collections` | `cloneNumParallelCollections` | 2 | 0-100 | Collections to clone in parallel |
195-
| `--clone-num-read-workers` | `cloneNumReadWorkers` | auto (0) | 0-1000 | Read workers during clone |
196-
| `--clone-num-insert-workers` | `cloneNumInsertWorkers` | auto (0) | 0-1000 | Insert workers during clone |
197-
| `--clone-segment-size` | `cloneSegmentSize` | auto | ~475MB-64GB | Segment size for parallel cloning |
198-
| `--clone-read-batch-size` | `cloneReadBatchSize` | ~47.5MB | 16MiB-2GiB | Read cursor batch size |
199-
200-
> **Note**: These CLI flags are hidden from `--help` output. They are intended for advanced tuning only.
201-
> Setting a value to 0 or empty string uses the automatic/default behavior.
202-
203-
Example CLI usage:
204-
205-
```sh
206-
bin/pcsm \
207-
--source <source-mongodb-uri> \
208-
--target <target-mongodb-uri> \
209-
--clone-num-parallel-collections 8 \
210-
--clone-num-read-workers 16
211-
```
168+
- `PCSM_SOURCE_URI`: MongoDB connection string for the source cluster.
169+
- `PCSM_TARGET_URI`: MongoDB connection string for the target cluster.
170+
- `PCSM_MONGODB_CLI_OPERATION_TIMEOUT`: Timeout for MongoDB client operations; accepts Go durations like `30s`, `2m`, `1h` (default: `5m`).
212171

213172
## Log JSON Fields
214173

@@ -247,19 +206,10 @@ Starts the replication process.
247206
248207
#### Request Body
249208
250-
| Parameter | Type | Description |
251-
|-------------------------------|----------|-------------------------------------------------|
252-
| `includeNamespaces` | string[] | Namespaces to include in replication |
253-
| `excludeNamespaces` | string[] | Namespaces to exclude from replication |
254-
| `cloneNumParallelCollections` | int | Collections to clone in parallel (0-100) |
255-
| `cloneNumReadWorkers` | int | Read workers during clone (0-1000) |
256-
| `cloneNumInsertWorkers` | int | Insert workers during clone (0-1000) |
257-
| `cloneSegmentSize` | string | Segment size (e.g., "500MB", "1GiB") |
258-
| `cloneReadBatchSize` | string | Read batch size (e.g., "32MiB") |
259-
260-
> **Note**: HTTP request values take precedence over CLI flag values for clone tuning options.
209+
- `includeNamespaces` (optional): List of namespaces to include in the replication.
210+
- `excludeNamespaces` (optional): List of namespaces to exclude from the replication.
261211
262-
Example (basic):
212+
Example:
263213
264214
```json
265215
{
@@ -268,17 +218,6 @@ Example (basic):
268218
}
269219
```
270220
271-
Example (with clone tuning):
272-
273-
```json
274-
{
275-
"includeNamespaces": ["mydb.*"],
276-
"cloneNumParallelCollections": 8,
277-
"cloneNumReadWorkers": 16,
278-
"cloneSegmentSize": "500MB"
279-
}
280-
```
281-
282221
#### Response
283222
284223
- `ok`: Boolean indicating if the operation was successful.

0 commit comments

Comments
 (0)