Closed Daniel-B-Smith closed 2 years ago
If we update the cpp option generation code here to include the argument type (o.paramType
):
And then update our FdbOptionInfo struct and macro to include the type:
https://github.com/apple/foundationdb/blob/b69d0fa68e0d1b7b20e971cfbf3a66d21aa60132/fdbclient/FDBOptions.h#L31 https://github.com/apple/foundationdb/blob/b69d0fa68e0d1b7b20e971cfbf3a66d21aa60132/fdbclient/FDBOptions.h#L99
We could then access the type information in the environment variable parsing code and have special logic for each type:
Can I try this one?
The network option setting code uses the default option code, which interprets the bytes passed to the option as a binary encoded 8 byte integer. The only way to set an integer value is to set the environment variable to the 8 byte binary encoding.