mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-21 06:36:54 +00:00
Two separate failures reported on 32-bit builds (void-linux 4.21): - weed/server: errorStreamImpl.count (and the same pattern in slowStream plus local totalEventsSent/totalSends) was a bare int64 sitting after smaller fields, so on 386/ARMv7/mips32 it landed at a 4-byte-aligned offset and atomic.AddInt64 panicked with "unaligned 64-bit atomic operation". Switched the counters to atomic.Int64, which Go guarantees is 8-byte aligned on every architecture. - weed/plugin/worker/iceberg: three equality-delete tests fail on 32-bit because the upstream github.com/apache/iceberg-go declares manifestEntry.EqualityIDs as *[]int while the Iceberg Avro schema defines equality_ids as long, and hamba/avro refuses to map Go int onto Avro long when int is 32-bit. Not fixable in seaweedfs, so guard the affected tests with a t.Skip() when unsafe.Sizeof(int) < 8 until the upstream type is changed to []int32/[]int64.
23 lines
854 B
Go
23 lines
854 B
Go
package iceberg
|
|
|
|
import (
|
|
"testing"
|
|
"unsafe"
|
|
)
|
|
|
|
// skipIfEqualityDeleteAvroUnsupported skips the test when running on a 32-bit
|
|
// architecture. The upstream github.com/apache/iceberg-go library declares
|
|
// manifestEntry.EqualityIDs as *[]int, but the Iceberg Avro schema declares
|
|
// equality_ids as a long array. hamba/avro rejects []int for Avro long when
|
|
// int is 32-bit (386, arm, mips), causing these tests to fail through no
|
|
// fault of seaweedfs. Tracked upstream; remove this guard once iceberg-go
|
|
// switches the field to []int32/[]int64.
|
|
func skipIfEqualityDeleteAvroUnsupported(t *testing.T) {
|
|
t.Helper()
|
|
if unsafe.Sizeof(int(0)) < 8 {
|
|
t.Skip("equality-delete Avro decoding is broken on 32-bit platforms " +
|
|
"because github.com/apache/iceberg-go declares EqualityIDs as *[]int " +
|
|
"but the Iceberg schema requires Avro long")
|
|
}
|
|
}
|