local db after remote, atomicity