MB-9872: Reconnect to cb server if default pool is not found
MB-10295 Fix performance issue with DISTINCT operator