You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "iushas (via GitHub)" <gi...@apache.org> on 2024/01/04 11:27:01 UTC

[D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

GitHub user iushas created a discussion: createbackup 以后,如何准确获取到备份完的位点

需求是,我想通过调用 Storage::CreateBackup创建备份,然后获取下备份完成时的位点 sequence num ,后面再通过解析增量数据。最终实现精确时间或者位点的备份恢复。 

![image](https://github.com/apache/kvrocks/assets/7236171/1a465d91-0dcd-4a68-8076-55e8a436498e)

我如果在调用完    Status s = storage->CreateBackup();之后接着调用    storage->LatestSeqNumber() + 1,可以拿到准确的位点吗。
如果不行的话,可以怎么处理比较好

GitHub link: https://github.com/apache/kvrocks/discussions/1986

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas edited a comment on the discussion: createbackup 以后,如何准确获取到备份完的位点

![image](https://github.com/apache/kvrocks/assets/7236171/2ababce9-43b9-4e5d-86e9-7d171fb2a874)
 zhe'li'yi'si'shi'sh这里意思是说,通过 rocksdb 的 checpoit 的获取的这个 seq 还是不准吗,

  // sequence_number_ptr: if it is not nullptr, the value it points to will be
  // set to a sequence number guaranteed to be part of the DB, not necessarily
  // the latest. The default value of this parameter is nullptr.

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8019161

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas closed the discussion with a comment: createbackup 以后,如何准确获取到备份完的位点

哦,看到了新的comment,意思是通过 CreateBackup 返回的sequence_number不是最新的。 
这个没问题,只要能保值是 CreateBackup完成时的sequence_number就行
👍

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8019185

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas closed the discussion with a comment: createbackup 以后,如何准确获取到备份完的位点

![image](https://github.com/apache/kvrocks/assets/7236171/2ababce9-43b9-4e5d-86e9-7d171fb2a874)
 zhe'li'yi'si'shi'sh这里意思是说,通过 rocksdb 的 checpoit 的获取的这个 seq 还是不准吗,

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8019161

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
GitHub user git-hulk added a comment to the discussion: createbackup 以后,如何准确获取到备份完的位点

这个信息可以在你们自己 CreateBackup 前后自己加上,这里也不是准确的完成时间,暴露没有意义。

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8019018

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas edited a comment on the discussion: createbackup 以后,如何准确获取到备份完的位点

![image](https://github.com/apache/kvrocks/assets/7236171/2ababce9-43b9-4e5d-86e9-7d171fb2a874)
这里意思是说,通过 rocksdb 的 checpoit 的获取的这个 seq 还是不准吗,

  // sequence_number_ptr: if it is not nullptr, the value it points to will be
  // set to a sequence number guaranteed to be part of the DB, not necessarily
  // the latest. The default value of this parameter is nullptr.

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8019161

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas closed a discussion: createbackup 以后,如何准确获取到备份完的位点

需求是,我想通过调用 Storage::CreateBackup创建备份,然后获取下备份完成时的位点 sequence num ,后面再通过解析增量数据。最终实现精确时间或者位点的备份恢复。 

![image](https://github.com/apache/kvrocks/assets/7236171/1a465d91-0dcd-4a68-8076-55e8a436498e)

我如果在调用完    Status s = storage->CreateBackup();之后接着调用    storage->LatestSeqNumber() + 1,可以拿到准确的位点吗。
如果不行的话,可以怎么处理比较好

GitHub link: https://github.com/apache/kvrocks/discussions/1986

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
GitHub user git-hulk added a comment to the discussion: createbackup 以后,如何准确获取到备份完的位点

@iushas 看了一下,CreateBackup 可以支持获取 Sequence,如果有需求可以支持。

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8012065

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas added a comment to the discussion: createbackup 以后,如何准确获取到备份完的位点


![image](https://github.com/apache/kvrocks/assets/7236171/4fd38ed4-c765-4efe-978d-18225c9b8c5e)

![image](https://github.com/apache/kvrocks/assets/7236171/96e6e04d-5331-4107-b45d-a5b819ce353b)

我如果将这个逻辑放到 kvrocks2redis的Parser::ParseFullDB里面执行的话,可不可以

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8011985

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas added a comment to the discussion: createbackup 以后,如何准确获取到备份完的位点

感谢大佬,可以把backup_creating_time_ 这个私有变量也想办法返回或者通过公有函数访问吗
![image](https://github.com/apache/kvrocks/assets/7236171/5e965bbe-9b70-4786-8eb3-7ab1642dec40)


GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8018832

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
GitHub user git-hulk closed the discussion with a comment: createbackup 以后,如何准确获取到备份完的位点

https://github.com/apache/kvrocks/pull/1987 已经解决,有其他问题可以重新创建。

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8019113

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] createbackup 以后,如何准确获取到备份完的位点 [kvrocks]

Posted by "iushas (via GitHub)" <gi...@apache.org>.
GitHub user iushas added a comment to the discussion: createbackup 以后,如何准确获取到备份完的位点

OK

GitHub link: https://github.com/apache/kvrocks/discussions/1986#discussioncomment-8019045

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org