-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Fix compute_table_stats failures with concurrent writes #15148
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
base: main
Are you sure you want to change the base?
Conversation
dramaticlly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shall add commit retry like other PendingUpdate implementation class, RemoveSnapshots is a good example. But we can probably simplify the unit test a bit
|
|
||
| // Skip if no changes | ||
| if (base == newMetadata) { | ||
| LOG.info("No statistics changes to commit, skipping"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think debug shall be sufficient here or we can remove it entirely.
| import org.slf4j.LoggerFactory; | ||
|
|
||
| public class SetStatistics implements UpdateStatistics { | ||
| private static final Logger LOG = LoggerFactory.getLogger(SetStatistics.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: new line after to separate with non-static
| * <p>Tests that SetStatistics properly handles concurrent modifications using retry mechanism. | ||
| */ | ||
| @ExtendWith(ParameterizedTestExtension.class) | ||
| public class TestSetStatisticsConcurrency extends TestBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a new unit test ? I think we might just bring those to TestSetStatistics.java. From what I can tell, the comment in unit test is uncommon, usually assertion with assertThat().as($comments) is self-explanatory.
compute_table_stats fails with CommitFailedException when concurrent writes modify table metadata during statistics computation.