Skip to content

check-crash: Support select --load_table in io_flush check#94

Merged
kou merged 5 commits intogroonga:mainfrom
abetomo:support-select-load
Jan 26, 2026
Merged

check-crash: Support select --load_table in io_flush check#94
kou merged 5 commits intogroonga:mainfrom
abetomo:support-select-load

Conversation

@abetomo
Copy link
Member

@abetomo abetomo commented Jan 26, 2026

We can load data using the --load_table option with the select command.
Therefore, we check load and select-load using the same logic.

We can specify the columns to load in both load and select-load.
If the columns is specified, we also check whether that column has been flushed.

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.
when "column_create"
"#{statistic.command.table}.#{statistic.command.name}" == io_flush.target_name
when "select"
statistic.command.arguments[:load_table] == io_flush.target_name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このテーブルのカラムたちもflushしてあるかは確認できる?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flush[xxx] のログで確認できたので、load_columns のカラムを確認するようにしました。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when "load"のときも同じようにできる?

Comment on lines 322 to 323
else
[nil, nil]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここに来るべきじゃないから、なにも書かないか、書くならraiseかな。

Suggested change
else
[nil, nil]

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(カラムじゃなくて)テーブルがflushされたかどうかってどこで確認してる?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

331行目の return false unless flushed.key?(load_table_name) です。ログの flush[xxx] にテーブル名が出力されてなかった時点で、flush済じゃない判定です。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

うっす。

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|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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|

@kou kou merged commit 32860bf into groonga:main Jan 26, 2026
6 checks passed
@abetomo abetomo deleted the support-select-load branch January 26, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants