StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.67k stars 1.75k forks source link

Stream Load transaction interface does not generate a label. #48465

Closed jkim650 closed 2 months ago

jkim650 commented 2 months ago

Steps to reproduce the behavior (Required)

  1. CREATE DATABASE IF NOT EXISTS test_db;
  2. CREATE TABLE IF NOT EXISTS test_db.test_table (id INT NOT NULL) ENGINE=OLAP PROPERTIES ("replication_num" = "1");
  3. curl --location-trusted -uroot: -H "Expect: 100-continue" -H "db: test_db" -H "table: test_table" -XPOST http://localhost:8030/api/transaction/begin -v

Expected behavior (Required)

Starrocks returns "Status": "OK" with a generated "Label" as documented in https://docs.starrocks.io/docs/loading/Stream_Load_transaction_interface/#precautions.

Real behavior (Required)

Starrocks returned "Status": "FAILED" with empty label message.

{
  "Status": "FAILED",
  "Message": "class com.starrocks.common.UserException: empty label."
}

StarRocks version (Required)

tracymacding commented 2 months ago

3.2.x?

banmoy commented 2 months ago

This should be a bug, and I will fix it later. Could you first specify the label explicitly as a workaround?

chaoyli commented 2 months ago

3.2.4 @tracymacding

jkim650 commented 2 months ago

This should be a bug, and I will fix it later. Could you first specify the label explicitly as a workaround?

Sure. Thanks.

banmoy commented 2 months ago

@jkim650 I checks the current implementation of transaction stream load again, and it actually relies on the user provided label at begin. The behavior is as expected, and since 2.5. So I will fix the wrong document description.