Skip to content

Fix intermittently failing schema evolution UT #5517

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ypatia
Copy link
Member

@ypatia ypatia commented May 27, 2025

Nightlies have been failing often on MacOS and ubuntu machines. I have reproduced locally on my laptop as well.
This is fixing the flaky behavior by making sure we remove and add an attribute to an array at the same timestamp, causing non deterministic schema evolution result.

This also removes a wrong assert that fails when building in debug mode.


TYPE: NO_HISTORY
DESC: Fix intermittently failing schema evolution UT

@@ -1106,15 +1106,15 @@ void test_schema_evolution_drop_fixed_add_var(

// Evolve schema to drop attribute "a"
ArraySchemaEvolution schema_evolution = ArraySchemaEvolution(ctx);
uint64_t now = tiledb_timestamp_now_ms() + 1;
uint64_t now = fragment_write_ts + 1;
schema_evolution.set_timestamp_range(std::make_pair(now, now));
schema_evolution.drop_attribute("a");
schema_evolution.array_evolve(array_uri);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the expectation is that now_ms() returns the same thing twice, right?

Given this sleep_for here, how does that happen?

@bekadavis9 bekadavis9 self-requested a review May 29, 2025 14:44
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