Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Pass bootstrap snapshot to Tarantool using error injection mechanism

Aperta
#239 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c
Ambito
testing-qa

Direzione di ricerca

Start with src/box/box.cc at box_cfg_xc() and src/box/memtx_engine.c at memtx_engine_bootstrap(), then review the replication tests and related issues #4801 and #5540. The work is complete when a custom bootstrap snapshot can be passed through the proposed option or error-injection mechanism instead of the built-in bootstrap.snap.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

suggested by @Totktonada in https://lists.tarantool.org/pipermail/tarantool-patches/2020-November/020808.html

While I thinking around the task, the idea how to solve the problem with
replication tests comes to me. I know, know. I should have to say it
before you start the task, but I don't know everything in advance,
learning together with you and do my best.

Back to the idea. We can implement an option or errinj to pass a path to
bootstrap snapshot to tarantool and feed it instead the built-in
bootstrap.snap. This way we'll go to the right branch here:

[src/box/box.cc; box_cfg_xc()]

 | if (checkpoint != NULL) {
 |         /* Recover the instance from the local directory */                            
 |         local_recovery(&instance_uuid, &replicaset_uuid,                               
 |                        &checkpoint->vclock);                                           
 | } else {
 |         /* Bootstrap a new instance */
 |         bootstrap(&instance_uuid, &replicaset_uuid,                                    
 |                   &is_bootstrap_leader);                                               
 | }

And so will land here:

[src/box/memtx_engine.c; memtx_engine_bootstrap()]

 | /* Recover from bootstrap.snap */
 | say_info("initializing an empty data directory");
 | struct xlog_cursor cursor;
 | if (xlog_cursor_openmem(&cursor, (const char *)bootstrap_bin,
 |                         sizeof(bootstrap_bin), "bootstrap") < 0)
 |         return -1;

It is the place, where we should give our custom snapshot instead of
bootstrap_bin (which contains src/box/bootstrap.snap content).


Lingua principale
Python
Stelle
13
Fork
19
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tarantool/test-run

Tutte le issue di tarantool/test-run

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.