Merge Tree Consistency Based on Relations Task
Learn more about how the Merge Tree Consistency Based on Relations Task checks inconsistencies in relation merge tree structure and optionally fixes the inconsistencies it finds.
Use Merge Tree Consistency Based on Relations Task to scan the RELATIONS column for inconsistencies in merge tree structure. If the task runs in fix mode, it fixes the inconsistencies it finds.
HTTP method and endpoint
Use the following HTTP method and endpoint path to start the relation merge tree consistency task.
POST {ApplicationURL}/mergeTreeConsistencyCheckForRelations?tenantId={tenantId}
Query parameters
The following table describes the query parameters and their values. When a request body is included, query parameters are generally not required. A query parameter is a key-value pair added to the end of a URL to modify or refine a request.
| Parameter | Type | Required | Description | Accepted values / Default |
|---|---|---|---|---|
tenantId | String | Yes | The unique identifier of the tenant to check. | Example: 6TYkze8cBijGhwS. |
distributed | Boolean | No | If set to true, the task runs in distributed mode. | true or false. Default: false. |
taskPartsCount | Integer | No | Number of tasks created for distributed reindexing. Each task reindexes its own part of objects, and all of them can run in parallel on different API nodes. | Recommended value: number of API nodes that can execute the task. Default: 2. Used only when distributed=true. |
fixInconsistency | Boolean | No | If set to false, the task reports inconsistencies but does not fix them. | true or false. Default: false. |
produceEvents | Boolean | No | If set to true, the task generates events when a relation is fixed. | true or false. Default: true. |
Request body
The following table describes the request body parameters, including accepted values and defaults.
| Parameter | Type | Required | Description | Accepted values / Default |
|---|---|---|---|---|
relationsToCheck | Array of strings | No | List of relation URIs to check. Use this parameter to limit the scan to specific affected relations. | JSON array of relation URIs. Default: if omitted, all relations are checked. |
Example request
Use the following example to see how a complete request is structured with query parameters and a JSON body.
POST {ApplicationURL}/mergeTreeConsistencyCheckForRelations?tenantId={tenantId}&fixInconsistency=true
Authorization: Bearer <access_token>
Content-Type: application/json
{
"relationsToCheck": [
"relations/06Oac9l",
"relations/06OagQ1",
"relations/71O7FfK",
"relations/0xBMes6",
"relations/03ZkPX6",
"relations/03ZkTnM",
"relations/03ZkLGq",
"relations/03ZkY3c"
]
}
Response body
The following table describes the fields returned in the response body.
| Parameter | Type | Description |
|---|---|---|
id | String | Unique identifier of the task. |
groupId | String | Identifier of the task group. |
createdTime | Number | Timestamp when the task was created. |
createdBy | String | User who created the task. |
updatedTime | Number | Timestamp when the task was last updated. |
updatedBy | String | User who last updated the task. |
type | String | Internal type of the launched task. |
status | String | Status of the task. |
name | String | Name of the task. |
createdOnHost | String | Host on which the task was created. |
executedOnHost | String | Host on which the task was executed. |
parallelExecution | Boolean | Indicates whether the task ran in parallel execution mode. |
nodesGroup | String | Node group used to execute the task. |
startTime | Number | Timestamp when the task started. |
endTime | Number | Timestamp when the task ended. |
parameters | Object | Task parameters, including the tenant ID, fix mode, payload, and event settings. |
currentState | Object | Current state of the task, including processing results. |
currentState.relationsWithInconsistency | Array | List of relation IDs with detected inconsistencies. |
currentState.relationsWithInconsistencyCount | Number | Number of relations with detected inconsistencies. |
currentState.numberOfProcessedObjects | Number | Number of processed relations. |
throughput | Number | Task processing throughput. |
duration | String | Total task duration. |
Example response
The following example shows a response with the created task details and task results.
{
"id" : "c15a681c-a22c-4a8d-8737-19ae299092ae",
"groupId" : "a88bd3dd-50b5-4a53-ba08-6dccdc8fce1e",
"createdTime" : 1779959496056,
"createdBy" : "admin",
"updatedTime" : 1779959496056,
"updatedBy" : "admin",
"type" : "com.reltio.businesslogic.tasks.consistency.mergetree.MergeTreeConsistencyRelationsTask",
"status" : "COMPLETED",
"name" : "MergeTree Consistency Scan Relations for tenant Merill",
"createdOnHost" : "DESKTOP-SOG68J6",
"executedOnHost" : "DESKTOP-SOG68J6",
"parallelExecution" : false,
"nodesGroup" : "test",
"startTime" : 1779959499934,
"endTime" : 1779959501519,
"parameters" : {
"tenantId" : "Merill",
"fixInconsistency" : "true",
"waitForExternalMatchQueue" : "false",
"taskPayload" : "{\"relationsToCheck\":[\"relations/00006OP\",\"relations/0000Aef\",\"relations/0000Euv\"]}",
"produceEvents" : "false"
},
"currentState" : {
"numberOfFailedToPublishEvents" : 0,
"relationsWithInconsistency" : [ "00006OP" ],
"lastHourThroughput" : 0.0,
"numberOfProcessedObjects" : 3,
"relationsWithInconsistencyCount" : 1,
"status" : "Completed"
},
"throughput" : 3.0,
"duration" : "1s"
}