fdb-record-layer
fdb-record-layer copied to clipboard
Rename methods that change an index's state to indicate they are async
There a few methods that manipulate an index's state, and those are currently asynchronous as they can perform database reads (though, arguably, they should read those from memory and just error if the store state hasn't been loaded yet). However, as the method names do not end in Async
, they can cause problems as it is easy to forget to wait on the result (as one often does not care about the actual result value). Additionally, it is probable that if there were a blocking call within the method, then the BlockingInAsync
detector might not know to throw an error.
We should rename the methods so that they indicate that they are asynchronous. (In practice, this probably means deprecating the old names to avoid breaking our API.) Ideally...we would also create synchronous versions (or consider making them only synchronous), though doing that in a way that doesn't break the API might be difficult.
One thing to note: doing this right now will cause merge skew with #774, so this should only be done after #774 is in (or the PR to create it should be ready to rebase).