Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Unregister aliases when a datastore option is unregistered #10998
Per #10981 (comment) if you unregister a datastore option with an alias, the alias would continue existing after the original option, causing it to continue receiving assignment values. The alias would continue overshadowing any directly-registered options as well.
This fixes 'delete' in the datastore class so it removes aliases for the deleted option. It also modifies find_key_case to require that an alias key actually exist before returning it (belt-and-suspenders), and observes that the linear scan of all keys was pointless in the non-alias case, since we fall through to returning the key anyway on no match.