code: private static void endTenantFlow() {
          Stack<TenantContextDataHolder> contextDataStack = parentHolderInstanceStack.get();
          if (contextDataStack != null) {
              holderInstance.set(contextDataStack.pop());
          }
      }
docs: This will end the tenant flow and restore the previous TenantContext.
  See TenantContextDataHolder#endTenantFlow()