[BUG] Stale table creates enter update validation instead of returning a version conflict
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 85/100
Direzione di ricerca
Start with updateEligibilityCheck and the existing OpenHouseInternalRepositoryImplTest in the :services:tables module. Run the named Gradle test, then add the two deterministic cases described for existing PRIMARY_TABLE and REPLICA_TABLE records. Done means INITIAL_TABLE_VERSION requests raise CommitFailedException before update-only properties are inspected, while non-initial replication updates remain permitted.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Willingness to contribute
Yes. I can contribute a fix for this bug independently.
OpenHouse version
Reproduced on main at 372efaf4440f721797f339811d5246f5c1feed14.
System information
- Linux
- OpenJDK 17
- Local Tables service repository tests; no external services required
Describe the problem
A create request carrying ValidatorConstants.INITIAL_TABLE_VERSION can reach the repository after another writer has created the same table. The existing-table path calls updateEligibilityCheck, which inspects update/replication properties before validating the requested base version.
This produces inconsistent outcomes:
- A normal create request that omits server-owned properties reaches
TableType.valueOf(null)inskipEligibilityCheckand throwsNullPointerException, rather than the expected version conflict. - Where the existing replica/replication handling skips update eligibility checks, the same stale create can pass this validation without a version conflict.
Expected behavior: once the table exists, reject an INITIAL_TABLE_VERSION request with CommitFailedException before inspecting update-only properties. Preserve the existing handling of non-initial replication updates.
Code to reproduce bug
Add deterministic tests to OpenHouseInternalRepositoryImplTest:
- Mock an existing table with
openhouse.clusterId=local,openhouse.tableType=PRIMARY_TABLE, andopenhouse.tableLocation=/db/table/00001.metadata.json. - Build a
TableDtousing the existingcreateTableDto(Map.of())helper and set its version toValidatorConstants.INITIAL_TABLE_VERSION. - Assert that
updateEligibilityCheck(existing, creation)throwsCommitFailedException. On the affected revision it throwsNullPointerException. - Repeat with an existing
REPLICA_TABLEand incoming properties identifying a remotePRIMARY_TABLE. A non-initial replication update remains permitted, but changing its version toINITIAL_TABLE_VERSIONshould conflict. Currently the stale create passes eligibility validation.
Run:
./gradlew :services:tables:test \
--tests com.linkedin.openhouse.tables.repository.impl.OpenHouseInternalRepositoryImplTest
Stacktrace, metrics and logs
The nine existing tests pass on the unmodified revision. With the two regressions added, the result is:
11 tests completed, 2 failed
concurrentCreationConflictsBeforeInspectingMissingReservedProperties:
Expected CommitFailedException; caused by NullPointerException
concurrentCreationConflictsForReplicaWhileReplicationUpdatesRemainAllowed:
Expected CommitFailedException, but nothing was thrown
Affected component
-
Table Service::services:tables
- Lingua principale
- Java
- Stelle
- 406
- Fork
- 86
- Merge medio
- 4g 6h
- PR unite (30g)
- 25
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di linkedin/openhouse
-
[BUG] Retention with backup fails for MONTH and YEAR time-partitioned tablesForse già presa @0z5a l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 28/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di linkedin/openhouse
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
citrusframework/citrus#2044 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug]打火石不能被放在厨具架上Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
KaleidoscopeMods/KaleidoscopeCookery#237 · 1 commento ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
molgenis/molgenis-emx2#7059 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
quarkiverse/quarkus-flow#1169 ·
I maintainer di solito rispondono entro 1 giorno