Slackbot
08/11/2026, 1:43 PMRocky
08/11/2026, 1:43 PMsql
ADMIN SHOW FRONTEND CONFIG LIKE '%arrow_flight_port%';
If the value is -1 or empty, the service is not enabled. A valid port (e.g., 9408) must be set.
2. Check Backend (BE) Configuration
You also need to verify that the backends have the Arrow Flight port enabled. You can check this by looking at the be.conf file on your BE nodes or by querying the configuration if your version supports it:
sql
-- Check if the port is set (usually the same port as FE)
ADMIN SHOW BACKEND CONFIG LIKE '%arrow_flight_port%';
3. Verify Session Variables
You can check related session variables to see if proxying or other Flight features are active:
sql
SHOW VARIABLES LIKE '%arrow_flight%';
4. Check Java Options (For FE)
For Arrow Flight SQL to function, the StarRocks FE must be started with specific Java modules opened. Check your fe.conf for the following `JAVA_OPTS`:
bash
--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
Without this, the service may fail to start even if the port is configured.
5. Network Check
Finally, you can check if the FE is actually listening on the configured port (default is often 9408) using a command line tool from the Airflow or client machine:
bash
telnet <fe_host> <arrow_flight_port>
# OR
nc -zv <fe_host> <arrow_flight_port>
If you were actually referring to an Airflow DAG named "flight" (e.g., from a demo), you would check its status in the Apache Airflow UI by searching for the DAG name in the dashboard and checking if the "Paused/Unpaused" toggle is on.
References
• unloading/arrow_flight.mdZurab Kiknavelidze
08/11/2026, 1:45 PMRocky
08/11/2026, 1:45 PMarrow_flight_port (e.g., 9408). The FE handles the authentication and query planning.
2. Data Transfer Modes
Once the query is planned, the data transfer happens in one of two ways:
* Direct Mode (Best Performance):
* The FE sends the client "tickets" that contain the addresses of the BE nodes.
* The client then connects directly to the BEs on their arrow_flight_port (e.g., 9419) to pull the data.
* Requirement: Your client must have network access to all BE IP addresses and their Arrow Flight ports.
* To enable: Set SET GLOBAL arrow_flight_proxy_enabled = false;.
* Proxy Mode (Default / Easiest for Networking):
* The client only communicates with the FE.
* The FE fetches the data from the BEs and streams it back to the client.
* This is useful if your BEs are in a private network or Kubernetes cluster where the client can't reach them directly.
* Note: This has a small performance overhead (roughly 8-10%) compared to direct access.
* To enable: Set SET GLOBAL arrow_flight_proxy_enabled = true; (this is the default).
Summary Table
Component | Port Configuration | Role
FE | arrow_flight_port in fe.conf | Entry point: Handles login, SQL parsing, and proxying (if enabled).
BE | arrow_flight_port in be.conf | Data source: Serves the actual columnar data to the client or FE proxy.
Important: You must set different ports for the FE and BE (e.g., FE: 9408, BE: 9419) if they are running on the same host, though in production they typically reside on different nodes.
References
• unloading/arrow_flight.md
References
• unloading/arrow_flight.mdZurab Kiknavelidze
08/11/2026, 2:05 PMRocky
08/11/2026, 2:06 PMadbc_driver_flightsql library.
Prerequisites:
bash
pip install adbc-driver-flightsql pyarrow
Test Script:
Replace <fe_host>, <fe_arrow_flight_port> (default 9408), <user>, and <password> with your cluster details.
python
import adbc_driver_flightsql.dbapi as flightsql
# The URI uses grpc:// for unencrypted or grpcs:// for SSL
uri = "grpc://<fe_host>:<fe_arrow_flight_port>"
user = "root"
password = ""
conn = flightsql.connect(
uri=uri,
db_kwargs={
"username": user,
"password": password,
}
)
with conn.cursor() as cur:
cur.execute("SELECT 1 as test_connection")
print(cur.fetchone())
# Optional: Test a real table
# cur.execute("SELECT * FROM your_db.your_table LIMIT 5")
# table = cur.fetch_arrow_table() # This returns a columnar Arrow Table
# print(table)
conn.close()
2. Testing via JDBC (DBeaver/BI Tools)
If you prefer using a GUI, you can use the official Arrow Flight SQL JDBC Driver.
* Driver Class: org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver
* Connection URL:
jdbc:arrow-flight-sql://<fe_host>:<fe_arrow_flight_port>/?useEncryption=false
* Note: If you are using Java 9+, you must add the following to your JVM arguments:
--add-opens=java.base/java.nio=ALL-UNNAMED
3. Verify on the StarRocks Side
While running your tests, you can check if the session is actually using Arrow Flight by running this in a standard MySQL client:
sql
-- Check current active connections and their protocols
SHOW PROCESSLIST;
Look for connections where the Command or info indicates they are coming through the Arrow Flight endpoint.
Common Troubleshooting
* Connection Refused: Ensure the arrow_flight_port is set in fe.conf and the FE was restarted.
* Handshake/Auth Fail: Check that the username/password in your script matches your StarRocks credentials.
* Direct vs Proxy: If your client is outside the network and cannot reach BE IPs, make sure you have set:
SET GLOBAL arrow_flight_proxy_enabled = true;
References
• unloading/arrow_flight.md
References
• unloading/arrow_flight.mdZurab Kiknavelidze
08/12/2026, 5:32 AMRocky
08/12/2026, 5:33 AMRunning state, waiting for a "close" signal that never arrives.
3. Driver Behavior: Power BI often uses background refreshes or connection pooling. If the driver holds a cursor open to allow for "fetching more rows," StarRocks will keep the query state as active.
Recommended Solutions
1. Upgrade StarRocks (Permanent Fix)
If you are on a version earlier than 3.5.9, upgrade to the latest patch of 3.5.x or 4.0. Specific fixes for Query ID collisions and session cleanup leaks in Arrow Flight were introduced in version 3.5.9.
2. Manual Cleanup (Workaround)
You can manually terminate the stuck queries from a standard MySQL client:
sql
-- Identify the stuck query
SHOW FULL PROCESSLIST;
-- Kill the specific query ID (or connection ID)
KILL QUERY <query_id>;
-- OR
KILL <connection_id>;
3. Adjust Timeout Settings
To prevent queries from staying "Running" indefinitely, ensure your session-level timeouts are configured. You can try setting these globally to see if it forces cleanup:
sql
-- Set global query timeout (default is 300s)
SET GLOBAL query_timeout = 300;
-- Adjust wait_timeout for idle connections
SET GLOBAL wait_timeout = 3600;
4. Power BI Specific Adjustments
* Disable Background Refresh: In Power BI Desktop, go to Options and Settings > Options > Current File > Data Load and uncheck "Allow data preview to download in the background". This prevents Power BI from opening and holding extra connections.
* Explicitly Close Connections: If you are using a custom SQL query in Power BI, ensure you are not using "DirectQuery" mode unless necessary, as it maintains more persistent active sessions than "Import" mode.
How to verify it's fixed
After upgrading or applying the workarounds, run your Power BI report and then immediately run SHOW PROCESSLIST in StarRocks. The query should move from Query to Sleep or disappear entirely once the data transfer is complete.
References
• unloading/arrow_flight.md
• administration/management/FE_configuration.md
References
• unloading/arrow_flight.md
• faq/Sql_faq.md
• faq/operation_maintenance_faq.md
• administration/management/BE_configuration.mdZurab Kiknavelidze
08/12/2026, 5:36 AMRocky
08/12/2026, 5:36 AMquery_id via Arrow Flight (fixed in 3.5.1).
* #71534: Fixed an issue where empty result sets returned incorrect column names (fixed in 4.0.0).
Recommendation:
If you are using Power BI with the Arrow Flight driver, it is highly recommended to upgrade to at least v3.5.9 or the latest v4.0.x / v4.1.x release, as these versions contain the most mature implementation of the protocol and specific fixes for session lifecycle management.
References
• unloading/arrow_flight.md
• administration/management/FE_configuration.md
References
• unloading/arrow_flight.md
• administration/management/FE_configuration.mdZurab Kiknavelidze
08/12/2026, 5:39 AMsession not closing issues no?Rocky
08/12/2026, 5:40 AMRunning state, waiting for the client to finish fetching rows.
2. Implicit Session Management: Unlike MySQL, Arrow Flight is a stateless RPC protocol. StarRocks maps these RPC calls to internal sessions. If the "Close" signal from the client is lost or not sent correctly by the Power BI driver, the session persists until it hits a timeout.
3. Conflict on Re-run: If you try to run the exact same query while the previous one is still in Running (orphaned), StarRocks may block the new execution due to internal locks on the query context or resources tied to that specific session/user.
Recommended Troubleshooting & Fixes
1. Set a Strict Global Query Timeout
To prevent these orphaned queries from wedging your system, reduce the query_timeout so the FE automatically kills them if they are left hanging:
sql
-- Default is usually 300s (5 mins). Try lowering it for testing.
SET GLOBAL query_timeout = 60;
2. Power BI Desktop Adjustment
Power BI has a "Background Data" feature that often opens invisible sessions.
* In Power BI Desktop, go to Options and Settings > Options.
* Under Current File, select Data Load.
* Uncheck "Allow data preview to download in the background".
This often solves the "stuck" query issue by ensuring Power BI only runs the queries you explicitly trigger.
3. Update the Driver
Ensure you are using the latest Apache Arrow Flight SQL JDBC/ADBC driver. There have been significant fixes in the Arrow project (v15.0 through v18.0) regarding how result sets are closed. If you are using an older version of the driver within Power BI, it may not be sending the teardown signals StarRocks expects.
4. Check FE Logs for Cleanup Errors
Search your FE leader logs (fe.log) for "Arrow" or "Flight". Look for errors such as:
* IllegalStateException: Tried to complete already-completed call
* Memory was leaked by query
These errors confirm that the session cleanup logic is failing, which helps in reporting the issue to the maintainers.
Summary
While 3.5.16 has the core fixes, the session lifecycle management for Arrow Flight is still being perfected. If the above workarounds don't help, you may need to use a standard MySQL JDBC connection for Power BI until the fixes in tracking issue #65615 are fully merged into a future patch (likely 3.5.17+ or 4.0.x).
References
• unloading/arrow_flight.md
• administration/management/FE_configuration.md
References
• unloading/arrow_flight.mdZurab Kiknavelidze
08/12/2026, 5:44 AMRocky
08/12/2026, 5:44 AMZurab Kiknavelidze
08/12/2026, 6:27 AMRocky
08/12/2026, 6:27 AMRunning state and keeps the internal Session lock active.
* Because the session is still active and "occupied," Power BI cannot use that same connection for new queries.
3. Power BI's Connection Reuse
Power BI often tries to optimize performance by reusing existing connections. If it has a "stuck" connection in its pool, it may keep trying to send queries through that same broken session, leading to the behavior you're seeing.
──────────
How to solve this in 3.5.16:
1. Lower the Session Timeout:
Reduce the query_timeout and wait_timeout globally or for the user. This forces the FE to kill "Running" queries that have been idle for too long, freeing up the session.
sql
-- Set a shorter timeout to clear stuck queries faster
SET GLOBAL query_timeout = 120; -- 2 minutes
2. Disable Power BI Background Refresh:
As mentioned before, Power BI Desktop's "Background Data" feature is the #1 cause of orphaned Arrow Flight sessions.
* Options > Current File > Data Load > Uncheck "Allow data preview to download in the background".
3. Check FE Port Configuration:
Ensure you are using the correct arrow_flight_port (default 9408). If you are using a proxy or load balancer, ensure it isn't holding the TCP connection open indefinitely while the gRPC stream inside it has failed.
4. Monitor via `show processlist`:
If Power BI is blocked, run SHOW PROCESSLIST; from a MySQL client. You will likely see the Arrow Flight query with a long duration. Manually run KILL <query_id>; to see if Power BI immediately resumes. If it does, the issue is definitely the lack of automatic cleanup.
Summary
The "Query ID collision" fix in 3.5.9 prevents multiple queries from crashing into each other, but it doesn't solve the problem of a single session being held hostage by a query that refuses to die. This is the main focus of the ongoing work in #65615.
References
• unloading/arrow_flight.md
• administration/management/FE_configuration.md
References
• unloading/arrow_flight.mdZurab Kiknavelidze
08/12/2026, 6:32 AMRocky
08/12/2026, 6:33 AMVectorSchemaRoot objects were not being closed during prepared statement creation, eventually leading to "stuck" FE memory and OOM.
2. PR #65558: <arrow-flight-sql|fix> query id collision
* Prevents sessions from getting "stuck" because of conflicting internal query IDs, which previously caused queries to hang or fail intermittently.
3. PR #72830: Queries could become unkillable during external resource cleanup
* Though newer, this PR addresses the specific scenario where a query becomes "unkillable" because the coordinator holds a lock while trying to clean up external resources—a classic "stuck" symptom.
4. PR #71534: <arrow-flight-sql|fix> incorrect column name for empty result set
* A minor but frequent cause of client-side (Power BI) hangs when the client expects a specific schema and gets a malformed one for empty results.
Why you still see it in 3.5.16
Even with these PRs, the session lifecycle is still being refined. The FE currently relies heavily on the client (the ADBC/JDBC driver) to send an explicit "Close" signal. If Power BI or the driver terminates the connection abruptly, the FE session can stay in a Running state until it hits the query_timeout.
Action Recommendation:
* Monitor #65615: Follow this issue for the upcoming "Session Lifecycle" specific PRs.
* Manual Kill: If a session is stuck, use SHOW PROCESSLIST and KILL [query_id] via a MySQL client to clear the lock.
* Driver Update: Ensure you are using the latest version of the Arrow Flight SQL JDBC/ADBC driver, as many "stuck" issues are actually caused by the driver failing to signal the end of a stream to the StarRocks FE.Zurab Kiknavelidze
08/12/2026, 6:34 AMRocky
08/12/2026, 6:35 AMfe.conf to include query_timeout settings that match your BI workload to ensure the server eventually reclaims those resources.
References
• unloading/arrow_flight.md
• administration/management/FE_configuration.md
References
• unloading/arrow_flight.md