fix(aix): add aix directory synchronization support#2115
fix(aix): add aix directory synchronization support#2115matthewmcneely merged 4 commits intodgraph-io:mainfrom
Conversation
|
|
✅ Deploy Preview for badger-docs canceled.
|
21435d9 to
ceab022
Compare
|
Hi, is there something I need to fix in the CL, or is this a CI issue? |
|
This PR has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open. |
|
This is still useful. Ping. |
|
@pmur tests are passing now, though I'm concerned about the maintenance cost of this when we don't have an environment to test on–is that something you're able/willing to help with? |
|
In case it's helpful, I'll point out that you can get some signal from compile-only testing via cross-compilation. For example, |
|
I can provide some help in a limited capacity. Note, I have been using publicly available resources to implement test this (the aix golang CI instance, and the aix gcc compiler farm instance). I hope @ayappanec might be able to provide more official help. He is part of the IBM team maintaining OSS software on aix. |
|
@pmur Thanks for tagging me here. |
|
ping |
|
This has been collected dust for awhile. Is this still blocking the transition of the Go AIX CI instance? |
Yeah, I re-checked golang/go#67299 (comment) and LUCI's cas dependency still fails to cross-compile for aix/ppc64 today: $ GOOS=aix GOARCH=ppc64 CGO_ENABLED=0 go install go.chromium.org/luci/client/cmd/cas@latest
go: downloading go.chromium.org/luci v0.0.0-20260121191827-3391df2e9ccc
[...]
# github.com/dgraph-io/badger/v3
go/pkg/mod/github.com/dgraph-io/badger/[email protected]/dir_unix.go:62:13: undefined: unix.FlockAn alternative might be to investigate how viable or disruptive it'd be to remove the dependency on badger from its dependency tree. |
matthewmcneely
left a comment
There was a problem hiding this comment.
@pmur Sorry for the delay. If we get this through, I'll add some aix-specific build commands to our CD to validation that at least it compiles without error.
AIX doesn't support a proper flock like linux, but it seems to have enough support for process level file locking using fcntl. Likewise, it does not support directory level fsync.
e370555 to
58b15a5
Compare
|
I suspect there is more work to get this running fully on AIX beyond implementing this. It runs, but some unit tests seem to run incredibly slow. Though, that may be related to the only machine I have access to (gcc119 in the gcc compiler farm). |
|
Ping |
I'm not keen on releasing AIX support if it's half-baked and non-performant. I do not have access to a machine running AIX. |
I wouldn't draw that conclusion from my N=1 sample of available machines. The community machine I have access to is slow to run anything; it's a shared community machine running old (power8) hardware. The lack of directory fsync support doesn't seem like a blocker. The documentation seems to indicate it's only best effort for OS crashes (loss of power, or otherwise). @ayappanec could you run the tests on more representative hardware? I don't trust gcc farm machine for anything performance related. |
|
@pmur Sure. Let me check and get back. |
|
Is that "jemalloc" is a prerequisite for this ? |
|
I ran the tests on gcc119 with something like As for jemalloc, @ayappanec you may know better. I tried building the tip of jemalloc on gcc119, it failed with a nonsensical: |
|
Thanks @pmur |
|
@ayappanec Can you describe the cpu and memory characteristics for the machine on which you ran that test? |
It has 15 virtual cpus (shared mode) and smt is 2. So logical cpus is 2x15 = 30. It's a POWER8 machine |
AIX doesn't support a proper flock like linux, but it seems to have enough support for process level file locking using fcntl.
For #2035
Problem
GOOS=aix does not build. AIX does not support a linux-like flock, and does not export
unix.Flock.Solution
Create an AIX specific directory-locking implementation using the AIX version of flock.