You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.9 KiB

  1. #ifndef TOKULOGGGER_H
  2. #define TOKULOGGGER_H
  3. #include "../include/db.h"
  4. #include "brttypes.h"
  5. #include "kv-pair.h"
  6. int tokulogger_create_and_open_logger (const char *directory, TOKULOGGER *resultp);
  7. int tokulogger_log_bytes(TOKULOGGER logger, int nbytes, void *bytes);
  8. int tokulogger_log_close(TOKULOGGER *logger);
  9. int tokulogger_log_checkpoint (TOKULOGGER, LSN*);
  10. int tokulogger_log_phys_add_or_delete_in_leaf (DB *db, TOKUTXN txn, DISKOFF diskoff, int is_add, const struct kv_pair *pair);
  11. int tokulogger_commit (TOKUTXN txn);
  12. int tokulogger_log_block_rename (TOKULOGGER /*logger*/, FILENUM /*fileid*/, DISKOFF /*olddiskoff*/, DISKOFF /*newdiskoff*/, DISKOFF /*parentdiskoff*/, int /*childnum*/);
  13. int tokutxn_begin (TOKUTXN /*parent*/,TOKUTXN *, TXNID /*txnid64*/, TOKULOGGER /*logger*/);
  14. int tokulogger_log_fcreate (TOKUTXN, const char */*fname*/, int /*mode*/);
  15. int tokulogger_log_fopen (TOKUTXN, const char * /*fname*/, FILENUM);
  16. int tokulogger_log_unlink (TOKUTXN, const char */*fname*/);
  17. int tokulogger_log_header (TOKUTXN, FILENUM, struct brt_header *);
  18. int tokulogger_log_newbrtnode (TOKUTXN txn, FILENUM filenum, DISKOFF offset, u_int32_t height, u_int32_t nodesize, char is_dup_sort_mode, u_int32_t rand4fingerprint);
  19. int tokulogger_fsync (TOKULOGGER logger);
  20. int toku_fread_u_int8_t (FILE *f, u_int8_t *v, u_int32_t *crc, u_int32_t *len);
  21. int toku_fread_u_int32_t_nocrclen (FILE *f, u_int32_t *v);
  22. int toku_fread_u_int32_t (FILE *f, u_int32_t *v, u_int32_t *crc, u_int32_t *len);
  23. int toku_fread_LSN (FILE *f, LSN *lsn, u_int32_t *crc, u_int32_t *len);
  24. int toku_fread_FILENUM (FILE *f, FILENUM *filenum, u_int32_t *crc, u_int32_t *len);
  25. int toku_fread_DISKOFF (FILE *f, DISKOFF *diskoff, u_int32_t *crc, u_int32_t *len);
  26. int toku_fread_TXNID (FILE *f, TXNID *txnid, u_int32_t *crc, u_int32_t *len);
  27. // fills in the bs with malloced data.
  28. int toku_fread_BYTESTRING (FILE *f, BYTESTRING *bs, u_int32_t *crc, u_int32_t *len);
  29. int toku_fread_LOGGEDBRTHEADER(FILE *f, LOGGEDBRTHEADER *v, u_int32_t *crc, u_int32_t *len);
  30. int toku_logprint_LSN (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  31. int toku_logprint_TXNID (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  32. int toku_logprint_BYTESTRING (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  33. int toku_logprint_FILENUM (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  34. int toku_logprint_DISKOFF (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  35. int toku_logprint_u_int8_t (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  36. int toku_logprint_u_int32_t (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  37. int toku_logprint_LOGGEDBRTHEADER (FILE *outf, FILE *inf, const char *fieldname, u_int32_t *crc, u_int32_t *len);
  38. #endif