check-crash: Support select --load_table in io_flush check#94
Merged
kou merged 5 commits intogroonga:mainfrom Jan 26, 2026
Merged
check-crash: Support select --load_table in io_flush check#94kou merged 5 commits intogroonga:mainfrom
select --load_table in io_flush check#94kou merged 5 commits intogroonga:mainfrom
Conversation
We can load data using the `--load_table` option with the `select` command. Therefore, it checks whether it has been flushed, same as with the `load` command.
kou
reviewed
Jan 26, 2026
| when "column_create" | ||
| "#{statistic.command.table}.#{statistic.command.name}" == io_flush.target_name | ||
| when "select" | ||
| statistic.command.arguments[:load_table] == io_flush.target_name |
Member
Author
There was a problem hiding this comment.
flush[xxx] のログで確認できたので、load_columns のカラムを確認するようにしました。
kou
reviewed
Jan 26, 2026
kou
reviewed
Jan 26, 2026
Comment on lines
322
to
323
| else | ||
| [nil, nil] |
Member
There was a problem hiding this comment.
ここに来るべきじゃないから、なにも書かないか、書くならraiseかな。
Suggested change
| else | |
| [nil, nil] |
kou
reviewed
Jan 26, 2026
Comment on lines
327
to
341
| def flushed_load?(statistic, flushed) | ||
| table_key, columns_key = load_check_keys(statistic) | ||
|
|
||
| load_table_name = statistic.command.arguments[table_key] | ||
| return false unless flushed.key?(load_table_name) | ||
| arguments_columns = statistic.command.arguments[columns_key] | ||
| return true unless arguments_columns | ||
|
|
||
| arguments_columns.split(",").each do |name| | ||
| name.strip! | ||
| next if name == "_key" | ||
| return false unless flushed["#{load_table_name}.#{name}"] | ||
| end | ||
| true | ||
| end |
Member
There was a problem hiding this comment.
(カラムじゃなくて)テーブルがflushされたかどうかってどこで確認してる?
Member
Author
There was a problem hiding this comment.
331行目の return false unless flushed.key?(load_table_name) です。ログの flush[xxx] にテーブル名が出力されてなかった時点で、flush済じゃない判定です。
kou
reviewed
Jan 26, 2026
Comment on lines
330
to
335
| load_table_name = statistic.command.arguments[table_key] | ||
| return false unless flushed.key?(load_table_name) | ||
| arguments_columns = statistic.command.arguments[columns_key] | ||
| return true unless arguments_columns | ||
|
|
||
| arguments_columns.split(",").each do |name| |
Member
There was a problem hiding this comment.
Suggested change
| load_table_name = statistic.command.arguments[table_key] | |
| return false unless flushed.key?(load_table_name) | |
| arguments_columns = statistic.command.arguments[columns_key] | |
| return true unless arguments_columns | |
| arguments_columns.split(",").each do |name| | |
| table_name = statistic.command.arguments[table_key] | |
| return false unless flushed.key?(table_name) | |
| columns = statistic.command.arguments[columns_key] | |
| return true unless columns | |
| columns.split(",").each do |name| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We can load data using the
--load_tableoption with theselectcommand.Therefore, we check
loadandselect-loadusing the same logic.We can specify the columns to load in both
loadandselect-load.If the columns is specified, we also check whether that column has been flushed.