Skip to content

Conversation

@Jack-LuoHongyi
Copy link

Summary

  • Type: deterministic behavior (schema visibility and row readiness)
  • Scope: test-only; no production changes
  • Module: gora-hive
  • Tests: #testGetPartitions, #testGetWebPage, #testGetWebPageDefaultFields

Root Cause
Hive schema and row visibility are eventually consistent. Running lookups immediately after writes can throw QueryParserException or return null rows, and NonDex order perturbations made the race more likely.

Fix
Introduce awaitWebPageSchema to retry reads until the schema exists and the target URL returns a non-null page, recreating the store when parser errors occur. Reuse the helper across the three getWebPage tests so they rely on deterministic URL inputs and wait for visibility to stabilize.

Validation

  • Local:
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testGetPartitions test
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testGetWebPage test
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testGetWebPageDefaultFields test
  • Order-perturbation verification (100 runs each) using edu.illinois:nondex-maven-plugin
  • Scope: test-only adjustments

Risk
Low. The changes only improve test determinism and visibility polling without touching production code paths.

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.

1 participant