References → Query Interruption

Overview

Dashboard operations, such as insight creation, rendering, searching, filtering, and sorting, acquire read locks on underlying assets, including schema objects, data columns, and joins, to ensure data consistency during execution. When queries run for extended periods, these locks block concurrent queries and critical system processes, such as schema synchronization, and consume significant system resources., which may lead to cascading performance degradation, delayed data refreshes, and increased query wait times.

To mitigate these risks and maintain system health and stability, Incorta provides configurable interruption mechanisms that automatically terminate long-running queries based on predefined thresholds. This document outlines the mechanisms for interrupting and managing long-running queries within the Incorta platform.

Query automatic interruption

Incorta provides tenant-level configurations that enable administrators to define execution time limits and off-heap memory usage thresholds for query processing. When a query or dashboard search request exceeds either the configured time limit or the maximum percentage of off-heap memory allocated for processing operations (excluding data columns), the system automatically terminates the query, releasing acquired read locks and freeing all reserved resources.

The query automatic interruption feature is disabled by default. Follow these steps to enable and configure it:

  1. Sign in to the Cluster Management Console (CMC) as a CMC or cloud administrator.
  2. Navigate to Clusters > <yourCluster> > Tenants > <yourTenant> > Configure.
  3. In the Tenant Configurations, do one of the following per your Incorta release:
    • For releases before 2024.7, select the Tuning tab, turn on the Query timeout toggle, and then specify the Query timeout in minutes.
    • Starting 2024.7, select the Analytics Workload Management tab, turn on the Query Automatic Interruption toggle, and then specify the Query timeout in minutes and the Query Max Off-heap Memory percentage.
  4. Save the changes.

For more information, refer to Configure Tenants > Tuning and Analytics Workload Management.

Interrupting queries blocking sync operations

Interrupting queries during synchronization processes requires distinct configurations. Dashboard queries that block synchronization processes can be interrupted after a configurable time period starting from the moment the query acquires a read lock.

This functionality is disabled by default. To enable this feature or change the configured time, you need to add two keys to the engine.properties file that exists in the Analytics Service directory (<installation_path>/IncortaNode/services/<analytics_service_directory>/incorta).

The two keys that control this feature are as follows:

PropertyDescriptionTypeDefault
engine.interrupt_query_by_syncEnables interruption of queries blocking sync processesBooleanfalse
engine.query_render_time_before_interruption_by_syncTime (in minutes) to wait before interrupting the query after it acquires a read lockInteger (Minimum value is 0)10

Limitations

  • Due to Java implementation, interrupted queries may not release locks immediately; they must first reach an internal interruption check.
  • This interruption mechanism does not apply to background synchronization processes.

What gets interrupted

Query interruption applies only to Engine-executed dashboard and query workloads that acquire read locks and block other operations. Supported scenarios include:

  • Creating an insight
  • Rendering a dashboard
  • Exporting a dashboard
  • Downloading a dashboard tab or insight (as CSV or Excel)
  • Sending a dashboard, dashboard tab, or insight via email or to a data destination (manually or scheduled)
  • Previewing a chart as a listing or aggregated table
  • Creating or updating an Incorta Analyzer table or view
  • Exploring the data of a table or view
  • Creating a data notification condition
  • Rendering a SQLi query that uses the Engine port (default: 5436)
  • Filtering operations
  • Dashboard searches (Starting with 2024.7)
  • Sorting operations (Starting with 2024.7.7 and 2026.1.0)

Logging and notifications

The system tracks terminated queries and records them in the system logs. When a query is automatically terminated, the system provides clear feedback to users through context-appropriate channels, displayed directly in the Analyzer interface, sent via email notification, or logged in SQLi audit files, depending on the query type and execution context. For example, the message displayed when opening a dashboard or editing an insight in the Analyzer varies based on the termination reason:

  • Queries blocking synchronization: "The query has been interrupted because the underlying data is being updated."
  • Queries exceeding resource thresholds: "The query has been interrupted because Query Timeout is enabled in the CMC and the query took longer than the allowed time limit (x. minutes)."
  • Queries terminated via an API endpoint request (Support Team only): "The query has been interrupted due to an API call."