Skip to content

Conversation

@Jack-LuoHongyi
Copy link

Summary

  • Type: deterministic behavior (schema visibility and key selection)
  • Scope: test-only; no production changes
  • Module: gora-hive
  • Tests: #testGet, #testGetNested, #testGetWithFields, #testObjectFieldValue, #testGetNonExisting

Root Cause
Hive metadata and row visibility propagate asynchronously. Running lookups immediately after writes could surface parser exceptions or null results in certain runs. The inherited defaults also exercised the recursive boss field and randomized primary keys, which occasionally triggered errors when simulated with the edu.illinois:nondex-maven-plugin order-perturbation plugin.

Fix
Introduce awaitEmployeeSchema to poll until the schema and requested row are observable, closing and recreating employeeStore on parser errors. Refactor the five get-oriented tests to use the helper, switch to stable keys such as employee-1234567890, and avoid expectations on recursive fields while preserving the original assertions.

Validation

  • Local:
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testGet test
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testGetNested test
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testGetWithFields test
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testObjectFieldValue test
    • mvn -pl gora-hive -Dtest=org.apache.gora.hive.store.TestHiveStore#testGetNonExisting test
  • Order-perturbation verification (100 iterations per method) using edu.illinois:nondex-maven-plugin
  • Scope: Test-only adjustments

Risk
Low. Changes add polling safeguards and deterministic inputs without touching production 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