blob: 28d9950982b21bcd9baf2c22f990305a598aec06 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package leveldb_proto;
// A proto to for storing metadata related to a SharedProtoDatabase client.
// Next tag: 3
message SharedDBMetadataProto {
// Add obsolete fields here.
reserved 2;
// For the global database, this is value increases every time a corruption
// is discovered, as a way for clients to determine whether there's been a
// corruption since the last time they checked.
// For clients, this number is set to the global value when they check their
// corruption status, to indicate that we don't need to tell them there was
// a corruption next time they check.
optional uint64 corruptions = 1;
// Stores the status of migration in the last session for the database.
enum MigrationStatus {
// No migration was attempted in the last session. Either unique or shared
// did not exist because migration was already done, or either of them
// failed to load.
// Last session used shared db and migration was successful.
// Last session used shared db and migration transfer was complete, but
// unique db was not deleted.
// Last session used unique db and migration from shared to unique was
// successful.
// last session used unique db and migration transfer from shared to unique
// was successful, but the shared db was not deleted.
optional MigrationStatus migration_status = 3;