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

Issues with persistency in storage File/S3/… with setting engine_file_allow_create_multiple_files #64052

Open
CurtizJ opened this issue May 17, 2024 · 0 comments

Comments

@CurtizJ
Copy link
Member

CurtizJ commented May 17, 2024

Describe the unexpected behaviour
All files created by storage with setting engine_file_allow_create_multiple_files except the first one are not visible by the storage after restart.

How to reproduce

DROP TABLE IF EXISTS test_file_insert;

CREATE TABLE test_file_insert (x UInt64) ENGINE = File(JSON, 'test_file.json');

SET engine_file_allow_create_multiple_files = 1;

INSERT INTO test_file_insert SELECT * FROM numbers(10);

INSERT INTO test_file_insert SELECT * FROM numbers(10);

SELECT _file, count() FROM test_file_insert GROUP BY _file ORDER BY _file ASC;

   ┌─_file────────────┬─count()─┐
1. │ test_file.1.json │      102. │ test_file.json10 │
   └──────────────────┴─────────┘

DETACH TABLE test_file_insert;
ATTACH TABLE test_file_insert;

SELECT _file, count() FROM test_file_insert GROUP BY _file ORDER BY _file ASC;

   ┌─_file──────────┬─count()─┐
1. │ test_file.json10 │
   └────────────────┴─────────┘

Expected behavior
The persistent storage with engine File should read from the same set of files after restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant