LPS-49541 Proper session factory configuration when sharding is enabled