started adjustments to switch from db to ndb