You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/09/23 12:50:56 UTC

[GitHub] [incubator-kvrocks] caipengbo commented on issue #904: Avoid using Get interface to obtain Metadata when iterating data during migration

caipengbo commented on issue #904:
URL: https://github.com/apache/incubator-kvrocks/issues/904#issuecomment-1256170615

   The original purpose of using `rocksdb::DB::Get()` to Get Metadata, I guess is to get the latest metadata (but mistakenly using the old snapshot).
   
   The purpose of this is: snapshot is created at the beginning of the migration. If a slot has been migrated for a long time, users may change the number of subkeys in complex types or change the expiration time. If we use metadata in very old snapshot to determine the expiration time, we may make a mistake. The subkey cannot be migrated to the target end. WAL only records metadata changes, not subkeys. In this case, subkeys will be completely lost. 
   
   However, as we discussed in #906, even if we get the latest snaphot, we still can't prevent users from modifying complex types of metadata. We still make errors in judgment. 
   
   As of now, this problem is unavoidable, and we welcome discussion of effective solutions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org