[Bug]: Hudi snapshot file sizes overflow above Integer.MAX_VALUE
Los mantenedores suelen responder en 2 días
Evaluación
Este issue todavía no se ha evaluado.
Descripción
What happened?
HudiTableDescriptor.getSnapshots casts the long total file size to int before assigning it to a long field. A 3 GiB snapshot therefore becomes -1073741824 bytes instead of 3221225472 bytes. Larger values can also wrap to a smaller positive size.
Affects Versions
Reproduced on master at 9442f8c. Released versions have not been checked.
What table formats are you seeing the problem on?
Hudi
What engines are you seeing the problem on?
AMS
How to reproduce
- Provide a
HudiSnapshotwith total file size3221225472L(3 GiB) throughHudiTable.getSnapshotList. - Call
HudiTableDescriptor.getSnapshotsand readgetOriginalFileSize()on the returned snapshot. - The result is
-1073741824L; expected3221225472L.
The regression test uses a real Hudi snapshot and descriptor, with the table snapshot lookup mocked so it does not require Hudi storage.
Relevant log output
For a 3 GiB snapshot: expected: <3221225472> but was: <-1073741824>.
Anything else
Proposed fix: Remove the narrowing int cast. Add size-boundary regressions, including Integer.MAX_VALUE, 2 GiB, 3 GiB and 5 GiB, plus field-mapping, operation-filtering and empty-list coverage.
Code was assisted by DeepSeek v4 Flash via Reasonix 1.39.4; submission text was assisted by Codex. The patch and local test results were reviewed.
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lenguaje dominante
- Java
- Estrellas
- 1.2k
- Forks
- 397
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 20
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/amoro
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)Posiblemente ocupada @MarkAlex1234 la tomó hace 4 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
fix: low-contrast secondary text color in global theme tokenQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertostale
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
apache/amoro#4157 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
fix: mock api server enabled in production build masks real error/loading uxQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertostale
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
apache/amoro#4155 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[Bug]: After 0.9, disabling self-optimizing leaves process RUNNING instead of CLOSEDPosiblemente ocupada @zhang-arvin la tomó hoy. Abiertotype:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
apache/amoro#4431 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[Bug]: AMS Spark type rendering loses Iceberg timestamp-without-zone semanticsPosiblemente ocupada @hutiefang76 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
Todos los issues de apache/amoro
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
floci-io/floci#5369 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
sqlcipher/sqlcipher-android#97 · 1 comentario ·
-
area-integrations
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug IIIF interoperability
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100