Go binding for 6.3.23

I had some trouble getting the Go binding working for the current version of FoundationDB that installs on Ubuntu via apt. It’s actually quite simple per topic “What is the go binding version in go.mod for fdb 6.3.24?”.

My issue was actually unrelated. I had installed the proper version correctly from the beginning but was confused when I got the error:

panic: FoundationDB error code 2203 (API version not supported)

Since I am sometimes an idiot I spent several hours scouring the internet for help with this. I tried to build the binding which failed miserably with missing C header files and other errors. This is unnecessary. I had already installed the correct version of the binding.

What confused me was the first example in the binding tutorial. I was looking at the latest version of the tutorial on pkg.go.dev which showed API version 720. The maximum API version for FoundationDB 6.3.23 is 630. In retrospect this should have been obvious to me from the stack trace (D’oh!).

The tutorial for the 6.3.23 tag showed 630. This page doesn’t seem to be available on pkg.go.dev but I found the doc source in github with that release number and there it was.

So I’m writing this to add to the possible search results on the web. There are very few for this edge case. I would also make two points:

  1. The API numbering scheme doesn’t have anything to do with the version numbering scheme. I found a list of API version numbers but no cross-reference to release numbers. Nor does this number show up in the CLI or the CLI status command AFAIK.
  2. It might be useful to add some verbiage to the Go binding tutorial to point out the API version number and how it might need to be changed, since the pkg.go.dev will by default show the latest release.

As a final note I would point to the protocol for major version number for Go modules. After version 1 the major version number is supposed to be appended to the module path. This may need to be addressed at some point if normal (non-hash) version numbers are to be supported.