HomePhabricator
Diffusion Comm 602119d1d0fe

[services] Backup - prevent sending logs for non-existing backups

Description

[services] Backup - prevent sending logs for non-existing backups

Summary:
Depends on D4074

This is a bug fix. If the backup for the given backup id does not exist in the database, we should abort sending log.

Test Plan:

  • terminal 1
cd services
yarn run-blob-service-dev-mode
  • terminal 2
cd services
yarn run-backup-service-dev-mode
  • terminal 3
git clone https://github.com/karol-bisztyga/grpc-playground.git
cd grpc-playground
git checkout backup-async

You can hard-code some fake backup-id in the code (Client.h - lastBackupID)

./build.sh
./cmake/build/bin/client

Then in terminal 3 create a new log

l

With an invalid current backup id, the log cannot be sent.

Reviewers: palys-swm

Reviewed By: palys-swm

Subscribers: ashoat, palys-swm, Adrian, atul, yayabosh

Differential Revision: https://phabricator.ashoat.com/D4075

Details