scoping of getDbPartitions() was wrong