AsyncToSync is performing exception mapping that converts exceptions to other exceptions types. This is problematic in some cases (e.g. Lucene ) where the asyncToSync calls are internal and the record layer needs to reason about their types.
So, this change requires the creation of a flavor of asyncToSync that can be called from record layer code where exception mapping should not be invoked.
AsyncToSync is performing exception mapping that converts exceptions to other exceptions types. This is problematic in some cases (e.g. Lucene ) where the asyncToSync calls are internal and the record layer needs to reason about their types. So, this change requires the creation of a flavor of asyncToSync that can be called from record layer code where exception mapping should not be invoked.