Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect results when transactional / ORC ACID Hive table accessed in Trino transaction #10760

Closed
findepi opened this issue Jan 24, 2022 · 1 comment · Fixed by #10798
Closed
Assignees
Labels
bug Something isn't working correctness

Comments

@findepi
Copy link
Member

findepi commented Jan 24, 2022

steps to reproduce

bin/ptl env up --environment singlenode --debug --config config-hdp3
docker exec -itu hive ptl-hadoop-master bash -l
[hive@hadoop-master /]$ beeline -n hive
0: jdbc:hive2://localhost:10000/default> CREATE TABLE t (a bigint) STORED AS ORC TBLPROPERTIES('transactional'='true');
$ bin/trino-cli --catalog hive --schema default
trino:default> START TRANSACTION;
START TRANSACTION                                                                                                         trino:default> INSERT INTO t VALUES 1,2,3,4,5,6,7,8,9;
INSERT: 9 rows

Query 20220124_111422_00003_z7hm9, FINISHED, 1 node
http://localhost:8080/ui/query.html?20220124_111422_00003_z7hm9
Splits: 11 total, 11 done (100.00%)
CPU Time: 0.5s total,     0 rows/s,     0B/s, 70% active
Per Node: 0.2 parallelism,     0 rows/s,     0B/s
Parallelism: 0.2
Peak Memory: 0B
2.67 [0 rows, 0B] [0 rows/s, 0B/s]

trino:default> ROLLBACK;
ROLLBACK
trino:default> SELECT * FROM t;
 a
---
 1
 2
 3
 4
 5
 6
 7
 8
 9
(9 rows)

expected

The transaction was rolled back, so the INSERT results should not be visible.
Also, concurrent readers shouldn't see INSERT effect until transaction is committed.

Or -- actually preferred -- writing to an ORC ACID or an insert-only Hive transactional table is rejected in an explicit (not autocommit) Trino transaction.

@findepi findepi added bug Something isn't working correctness labels Jan 24, 2022
@findepi
Copy link
Member Author

findepi commented Jan 24, 2022

Fix should be similar to #9675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctness
Development

Successfully merging a pull request may close this issue.

2 participants