Unify and manage your data

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.

ParameterTypeRequiredDescriptionAccepted values / Default
tenantIdStringYesThe unique identifier of the tenant to check.Example: 6TYkze8cBijGhwS.
distributedBooleanNoIf set to true, the task runs in distributed mode.true or false. Default: false.
taskPartsCountIntegerNoNumber 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.
fixInconsistencyBooleanNoIf set to false, the task reports inconsistencies but does not fix them.true or false. Default: false.
produceEventsBooleanNoIf 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.

ParameterTypeRequiredDescriptionAccepted values / Default
relationsToCheckArray of stringsNoList 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.

ParameterTypeDescription
idStringUnique identifier of the task.
groupIdStringIdentifier of the task group.
createdTimeNumberTimestamp when the task was created.
createdByStringUser who created the task.
updatedTimeNumberTimestamp when the task was last updated.
updatedByStringUser who last updated the task.
typeStringInternal type of the launched task.
statusStringStatus of the task.
nameStringName of the task.
createdOnHostStringHost on which the task was created.
executedOnHostStringHost on which the task was executed.
parallelExecutionBooleanIndicates whether the task ran in parallel execution mode.
nodesGroupStringNode group used to execute the task.
startTimeNumberTimestamp when the task started.
endTimeNumberTimestamp when the task ended.
parametersObjectTask parameters, including the tenant ID, fix mode, payload, and event settings.
currentStateObjectCurrent state of the task, including processing results.
currentState.relationsWithInconsistencyArrayList of relation IDs with detected inconsistencies.
currentState.relationsWithInconsistencyCountNumberNumber of relations with detected inconsistencies.
currentState.numberOfProcessedObjectsNumberNumber of processed relations.
throughputNumberTask processing throughput.
durationStringTotal 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"
}