load db in background, and handle two stream of data: target version and latest version