Zero  0.1.0
logrec.h
Go to the documentation of this file.
1 /*
2  * (c) Copyright 2011-2014, Hewlett-Packard Development Company, LP
3  */
4 
5 /* -*- mode:C++; c-basic-offset:4 -*-
6  Shore-MT -- Multi-threaded port of the SHORE storage manager
7 
8  Copyright (c) 2007-2009
9  Data Intensive Applications and Systems Labaratory (DIAS)
10  Ecole Polytechnique Federale de Lausanne
11 
12  All Rights Reserved.
13 
14  Permission to use, copy, modify and distribute this software and
15  its documentation is hereby granted, provided that both the
16  copyright notice and this permission notice appear in all copies of
17  the software, derivative works or modified versions, and any
18  portions thereof, and that both notices appear in supporting
19  documentation.
20 
21  This code is distributed in the hope that it will be useful, but
22  WITHOUT ANY WARRANTY; without even the implied warranty of
23  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS
24  DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
25  RESULTING FROM THE USE OF THIS SOFTWARE.
26 */
27 
28 /*<std-header orig-src='shore' incl-file-exclusion='LOGREC_H'>
29 
30  $Id: logrec.h,v 1.73 2010/12/08 17:37:42 nhall Exp $
31 
32 SHORE -- Scalable Heterogeneous Object REpository
33 
34 Copyright (c) 1994-99 Computer Sciences Department, University of
35  Wisconsin -- Madison
36 All Rights Reserved.
37 
38 Permission to use, copy, modify and distribute this software and its
39 documentation is hereby granted, provided that both the copyright
40 notice and this permission notice appear in all copies of the
41 software, derivative works or modified versions, and any portions
42 thereof, and that both notices appear in supporting documentation.
43 
44 THE AUTHORS AND THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY
45 OF WISCONSIN - MADISON ALLOW FREE USE OF THIS SOFTWARE IN ITS
46 "AS IS" CONDITION, AND THEY DISCLAIM ANY LIABILITY OF ANY KIND
47 FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
48 
49 This software was developed with support by the Advanced Research
50 Project Agency, ARPA order number 018 (formerly 8230), monitored by
51 the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.
52 Further funding for this work was provided by DARPA through
53 Rome Research Laboratory Contract No. F30602-97-2-0247.
54 
55 */
56 
57 #ifndef __LOGREC_H
58 #define __LOGREC_H
59 
60 #include "w_defines.h"
61 
62 /* -- do not edit anything above this line -- </std-header>*/
63 
64 class rangeset_t;
65 struct multi_page_log_t;
66 class RestoreBitmap;
67 class xct_t;
68 
69 #include "lsn.h"
70 #include "tid_t.h"
71 #include "generic_page.h" // logrec size == 3 * page size
72 #include "allocator.h"
73 
74 struct baseLogHeader {
75  uint16_t _len; // length of the log record
76  u_char _type; // kind_t (included from logtype_gen.h)
77  u_char _flags;
78  /* 4 */
79 
80  // Was _pid; broke down to save 2 bytes:
81  // May be used ONLY in set_pid() and pid()
82  PageID _pid; // 4 bytes
83  /* 4 + 4=8 */
84 
85 
86  // CS TODO: temporary placeholder for old vid
87  uint16_t _fill_vid;
88 
89  uint16_t _page_tag; // tag_t 2 bytes
90  /* 8 + 4= 12 */
91  StoreID _stid; // 4 bytes
92  /* 12 + 4= 16*/
93 
94 
95 
96  // lsn_t _undo_nxt; // (xct) used in CLR only
97  /*
98  * originally: you might think it would be nice to use one lsn_t for
99  * both _xid_prev and for _undo_lsn, but for the moment we need both because
100  * at the last minute, fill_xct_attr() is called and that fills in
101  * _xid_prev, clobbering its value with the prior generated log record's lsn.
102  * It so happens that set_clr() is called prior to fill_xct_attr().
103  * It might do to set _xid_prev iff it's not already set, in fill_xct_attr().
104  * NB: this latter suggestion is what we have now done.
105  */
106 
114 
115  /* 16+8 = 24 */
116 
117  bool is_valid() const;
118 };
119 
121 
122  tid_t _xid; // NOT IN SINGLE-LOG SYSTEM TRANSACTION! (xct)tid of this xct
123  /* 24+8 = 32 */
124  lsn_t _xid_prv; // NOT IN SINGLE-LOG SYSTEM TRANSACTION! (xct)previous logrec of this xct
125  /* 32+8 = 40 */
126 };
127 
143 class logrec_t {
144 public:
145  friend class XctLogger;
146  friend class sysevent;
147  friend class baseLogHeader;
148 
149  enum kind_t {
150  t_comment = 0,
151  t_compensate = 1,
152  t_skip = 2,
153  t_chkpt_begin = 3,
154  // t_chkpt_bf_tab = 4,
155  // t_chkpt_xct_tab = 5,
156  // t_chkpt_xct_lock = 6,
157  t_warmup_done = 7,
158  t_alloc_format = 8,
159  t_evict_page = 9,
160  t_add_backup = 10,
161  t_xct_abort = 11,
162  t_fetch_page = 12,
163  t_xct_end = 13,
164  // t_xct_end_group = 14,
165  t_xct_latency_dump = 15,
166  t_alloc_page = 16,
167  t_dealloc_page = 17,
168  t_create_store = 18,
169  t_append_extent = 19,
170  t_loganalysis_begin = 20,
171  t_loganalysis_end = 21,
172  t_redo_done = 22,
173  t_undo_done = 23,
174  t_restore_begin = 24,
175  t_restore_segment = 25,
176  t_restore_end = 26,
177  // t_page_set_to_be_deleted = 27,
178  t_stnode_format = 27,
179  t_page_img_format = 28,
180  t_update_emlsn = 29,
181  t_btree_norec_alloc = 30,
182  t_btree_insert = 31,
183  t_btree_insert_nonghost = 32,
184  t_btree_update = 33,
185  t_btree_overwrite = 34,
186  t_btree_ghost_mark = 35,
187  t_btree_ghost_reclaim = 36,
188  t_btree_ghost_reserve = 37,
189  t_btree_foster_adopt = 38,
190  // t_btree_foster_merge = 39,
191  // t_btree_foster_rebalance = 40,
192  // t_btree_foster_rebalance_norec = 41,
193  // t_btree_foster_deadopt = 42,
194  t_btree_split = 43,
195  t_btree_compress_page = 44,
196  t_tick_sec = 45,
197  t_tick_msec = 46,
198  t_benchmark_start = 47,
199  t_page_write = 48,
200  t_page_read = 49,
201  t_max_logrec = 50
202  };
203 
204  bool is_page_update() const;
205 
206  bool is_redo() const;
207 
208  bool is_skip() const;
209 
210  bool is_undo() const;
211 
212  bool is_cpsn() const;
213 
214  bool is_multi_page() const;
215 
216  bool is_root_page() const;
217 
218  bool is_logical() const;
219 
220  bool is_system() const;
221 
222  bool is_single_sys_xct() const;
223 
224  bool valid_header(const lsn_t& lsn_ck = lsn_t::null) const;
225 
226  smsize_t header_size() const;
227 
228  template<class PagePtr>
229  void redo(PagePtr);
230 
231  static constexpr u_char get_logrec_cat(kind_t type);
232 
233  void redo();
234 
235  template<class PagePtr>
236  void undo(PagePtr);
237 
238  void init_header(kind_t);
239 
240  template<class PagePtr>
241  void init_page_info(const PagePtr p) {
242  header._page_tag = p->tag();
243  header._pid = p->pid();
244  header._stid = p->store();
245  }
246 
247  void set_size(size_t l);
248 
249  void init_xct_info();
250 
251  void set_xid_prev(tid_t tid, lsn_t last);
252 
253  enum {
254  max_sz = 3 * sizeof(generic_page),
255  hdr_non_ssx_sz = sizeof(baseLogHeader) + sizeof(xidChainLogHeader),
256  hdr_single_sys_xct_sz = sizeof(baseLogHeader),
257  // max_data_sz is conservative.
258  // we don't allow the last 16 bytes to be used (anyway very rarely used)
259  max_data_sz = max_sz - hdr_non_ssx_sz - sizeof(lsn_t)
260  };
261 
262  static_assert(hdr_non_ssx_sz == 40, "Wrong logrec header size");
263  static_assert(hdr_single_sys_xct_sz == 40 - 16, "Wrong logrec header size");
264 
265  tid_t tid() const;
266 
267  StoreID stid() const;
268 
269  PageID pid() const;
270 
271  PageID pid2() const;
272 
273 public:
274  uint16_t tag() const;
275 
276  smsize_t length() const;
277 
278  const lsn_t& undo_nxt() const;
279 
284  const lsn_t& page_prev_lsn() const;
285 
286  const lsn_t& page2_prev_lsn() const;
287 
292  void set_page_prev_lsn(const lsn_t& lsn);
293 
294  const lsn_t& xid_prev() const;
295 
296  void set_xid_prev(const lsn_t& lsn);
297 
298  void set_undo_nxt(const lsn_t& lsn);
299 
300  void set_tid(tid_t tid);
301 
302  void set_clr(const lsn_t& c);
303 
304  void set_root_page();
305 
306  void set_pid(const PageID& p);
307 
308  kind_t type() const;
309 
310  const char* type_str() const {
311  return get_type_str(type());
312  }
313 
314  static const char* get_type_str(kind_t);
315 
316  const char* cat_str() const;
317 
318  const char* data() const;
319 
320  char* data();
321 
322  const char* data_ssx() const;
323 
324  char* data_ssx();
325 
327  multi_page_log_t* data_ssx_multi();
328 
330  const multi_page_log_t* data_ssx_multi() const;
331 
332  const lsn_t& lsn_ck() const {
333  return *_lsn_ck();
334  }
335 
336  const lsn_t& lsn() const {
337  return *_lsn_ck();
338  }
339 
340  const lsn_t get_lsn_ck() const {
341  lsn_t tmp = *_lsn_ck();
342  return tmp;
343  }
344 
345  void set_lsn_ck(const lsn_t& lsn_ck) {
346  // put lsn in last bytes of data
347  lsn_t& where = *_lsn_ck();
348  where = lsn_ck;
349  }
350 
351  void corrupt();
352 
353  void remove_info_for_pid(PageID pid);
354 
355  // Tells whether this log record restores a full page image, meaning
356  // that the previous history is not needed during log replay.
357  bool has_page_img(PageID page_id) {
358  return
359  // CS TODO: I think the condition for norec_alloc should be == and not !=
360  (type() == logrec_t::t_btree_norec_alloc && page_id != pid())
361  || (type() == logrec_t::t_btree_split && page_id == pid())
362  || (type() == logrec_t::t_page_img_format)
363  || (type() == logrec_t::t_stnode_format)
364  || (type() == logrec_t::t_alloc_format);
365  }
366 
367  friend ostream& operator<<(ostream&, logrec_t&);
368 
369 protected:
370 
371  enum category_t {
373  t_bad_cat = 0x00,
375  t_system = 0x01,
377  t_undo = 0x02,
379  t_redo = 0x04,
381  t_multi = 0x08,
386  t_logical = 0x10,
387 
389  t_single_sys_xct = 0x80
390  };
391 
392  enum flag_t {
393  // If this logrec is a CLR
394  t_cpsn = 0x01,
395  // If this logrec refers to a root page (in a general sense, a root is
396  // any page which cannot be recovered by SPR because no other page
397  // points to it
398  t_root_page = 0x02
399  };
400 
401  u_char cat() const;
402 
404 
405  // single-log system transactions will overwrite this with _data
407 
408  /*
409  * NOTE re sizeof header:
410  * NOTE For single-log system transaction, NEVER use this directly.
411  * Always use data_ssx() to get the pointer because it starts
412  * from 16 bytes ahead. See comments about single-log system transaction.
413  */
414  char _data[max_sz - sizeof(baseLogHeader) - sizeof(xidChainLogHeader)];
415 
416  // The last sizeof(lsn_t) bytes of data are used for
417  // recording the lsn.
418  // Should always be aligned to 8 bytes.
420  w_assert3(alignon(header._len, 8));
421  char* this_ptr = reinterpret_cast<char*>(this);
422  return reinterpret_cast<lsn_t*>(this_ptr + header._len - sizeof(lsn_t));
423  }
424 
425  const lsn_t* _lsn_ck() const {
426  w_assert3(alignon(header._len, 8));
427  const char* this_ptr = reinterpret_cast<const char*>(this);
428  return reinterpret_cast<const lsn_t*>(this_ptr + header._len - sizeof(lsn_t));
429  }
430 
431 public:
432  // overloaded new/delete operators for tailored memory management
433  void* operator new(size_t);
434 
435  void operator delete(void*, size_t);
436 
437  // CS: apparently we have to define placement new as well if the standard
438  // new is overloaded
439  void* operator new(size_t, void* p) {
440  return p;
441  }
442 };
443 
444 inline bool baseLogHeader::is_valid() const {
445  return (_len >= sizeof(baseLogHeader)
447  && _len <= sizeof(logrec_t));
448 }
449 
469 
472 
474  uint32_t _fill4; // +4.
475 
476  multi_page_log_t(PageID page2_pid) : _page2_prv(lsn_t::null),
477  _page2_pid(page2_pid) {}
478 };
479 
480 // for single-log system transaction, we use tid/_xid_prev as data area!
481 inline const char* logrec_t::data() const {
482  return _data;
483 }
484 
485 inline char* logrec_t::data() {
486  return _data;
487 }
488 
489 inline const char* logrec_t::data_ssx() const {
490  return _data - sizeof(xidChainLogHeader);
491 }
492 
493 inline char* logrec_t::data_ssx() {
494  return _data - sizeof(xidChainLogHeader);
495 }
496 
498  if (is_single_sys_xct()) {
499  return hdr_single_sys_xct_sz;
500  } else {
501  return hdr_non_ssx_sz;
502  }
503 }
504 
505 inline PageID
506 logrec_t::pid() const {
507  return header._pid;
508 }
509 
510 inline StoreID
511 logrec_t::stid() const {
512  return header._stid;
513 }
514 
515 inline PageID logrec_t::pid2() const {
516  if (!is_multi_page()) {
517  return 0;
518  }
519 
520  const multi_page_log_t* multi_log = reinterpret_cast<const multi_page_log_t*> (data_ssx());
521  return multi_log->_page2_pid;
522 }
523 
524 inline void
526  header._pid = p;
527 }
528 
529 inline void
531  xidInfo._xid = tid;
532 }
533 
534 inline void
535 logrec_t::set_undo_nxt(const lsn_t& undo_nxt) {
536  xidInfo._xid_prv = undo_nxt;
537 }
538 
539 inline uint16_t
540 logrec_t::tag() const {
541  return header._page_tag;
542 }
543 
544 inline smsize_t
546  return header._len;
547 }
548 
549 inline const lsn_t&
551  // To shrink log records,
552  // we've taken out _undo_nxt and
553  // overloaded _xid_prev.
554  // return _undo_nxt;
555  return xid_prev();
556 }
557 
558 inline const lsn_t&
560  // What do we need to assert in order to make sure there IS a page_prv?
561  return header._page_prv;
562 }
563 
564 inline const lsn_t&
566  if (!is_multi_page()) {
567  return lsn_t::null;
568  }
569  return data_ssx_multi()->_page2_prv;
570 }
571 
572 inline void
574  // What do we need to assert in order to make sure there IS a page_prv?
575  header._page_prv = lsn;
576 }
577 
578 inline tid_t logrec_t::tid() const {
579  if (is_single_sys_xct()) {
580  return tid_t{0};
581  }
582  return xidInfo._xid;
583 }
584 
585 inline const lsn_t&
587  w_assert1(!is_single_sys_xct()); // otherwise this part is in data area!
588  return xidInfo._xid_prv;
589 }
590 
591 inline void
593  w_assert1(!is_single_sys_xct()); // otherwise this part is in data area!
594  xidInfo._xid_prv = lsn;
595 }
596 
597 inline logrec_t::kind_t
598 logrec_t::type() const {
599  return (kind_t)header._type;
600 }
601 
602 inline u_char
603 logrec_t::cat() const {
604  return get_logrec_cat(static_cast<logrec_t::kind_t>(header._type));
605 }
606 
607 inline void
609  w_assert0(!is_single_sys_xct()); // CLR shouldn't be output in this case
610  header._flags |= t_cpsn;
611 
612  // To shrink log records,
613  // we've taken out _undo_nxt and
614  // overloaded _prev.
615  // _undo_nxt = c;
616  xidInfo._xid_prv = c; // and _xid_prv is data area if is_single_sys_xct
617 }
618 
619 inline void
621  header._flags |= t_root_page;
622 }
623 
624 inline bool
626  return (cat() & t_system) != 0;
627 }
628 
629 inline bool
631  return (cat() & t_redo) != 0;
632 }
633 
634 inline bool logrec_t::is_multi_page() const {
635  return (cat() & t_multi) != 0;
636 }
637 
638 inline bool
640  return type() == t_skip;
641 }
642 
643 inline bool
645  return (cat() & t_undo) != 0;
646 }
647 
648 inline bool
650  return (header._flags & t_cpsn) != 0;
651 }
652 
653 inline bool
655  return (header._flags & t_root_page) != 0;
656 }
657 
658 inline bool
660  // CS: I have no idea why a compensation log record is not considered a
661  // page update. In fact every check of in_page_update() is or'ed with
662  // is_cpsn()
663  return is_redo() && !is_cpsn();
664 }
665 
666 inline bool
668  return (cat() & t_logical) != 0;
669 }
670 
671 inline bool
673  return (cat() & t_single_sys_xct) != 0;
674 }
675 
677  w_assert1(is_multi_page());
678  return reinterpret_cast<multi_page_log_t*>(data_ssx());
679 }
680 
682  w_assert1(is_multi_page());
683  return reinterpret_cast<const multi_page_log_t*>(data_ssx());
684 }
685 
686 constexpr u_char logrec_t::get_logrec_cat(kind_t type) {
687  switch (type) {
688  case t_comment :
689  return t_system;
690  case t_tick_sec :
691  return t_system;
692  case t_tick_msec :
693  return t_system;
694  case t_benchmark_start :
695  return t_system;
696  case t_page_write :
697  return t_system;
698  case t_page_read :
699  return t_system;
700  case t_skip :
701  return t_system;
702  case t_chkpt_begin :
703  return t_system;
704  case t_loganalysis_begin :
705  return t_system;
706  case t_loganalysis_end :
707  return t_system;
708  case t_redo_done :
709  return t_system;
710  case t_undo_done :
711  return t_system;
712  case t_warmup_done:
713  return t_system;
714  case t_restore_begin :
715  return t_system;
716  case t_restore_segment :
717  return t_system;
718  case t_restore_end :
719  return t_system;
720  case t_xct_latency_dump :
721  return t_system;
722  case t_add_backup :
723  return t_system;
724  case t_evict_page :
725  return t_system;
726  case t_fetch_page :
727  return t_system;
728 
729  case t_compensate :
730  return t_logical;
731  case t_xct_abort :
732  return t_logical;
733  case t_xct_end :
734  return t_logical;
735 
736  case t_alloc_page :
737  return t_redo | t_single_sys_xct;
738  case t_stnode_format :
739  return t_redo | t_single_sys_xct;
740  case t_alloc_format :
741  return t_redo | t_single_sys_xct;
742  case t_dealloc_page :
743  return t_redo | t_single_sys_xct;
744  case t_create_store :
745  return t_redo | t_single_sys_xct;
746  case t_append_extent :
747  return t_redo | t_single_sys_xct;
748  case t_page_img_format :
749  return t_redo | t_undo;
750  case t_update_emlsn :
751  return t_redo | t_single_sys_xct;
752  case t_btree_norec_alloc :
753  return t_redo | t_multi | t_single_sys_xct;
754  case t_btree_insert :
755  return t_redo | t_undo | t_logical;
756  case t_btree_insert_nonghost :
757  return t_redo | t_undo | t_logical;
758  case t_btree_update :
759  return t_redo | t_undo | t_logical;
760  case t_btree_overwrite :
761  return t_redo | t_undo | t_logical;
762  case t_btree_ghost_mark :
763  return t_redo | t_undo | t_logical;
764  case t_btree_ghost_reclaim :
765  return t_redo | t_single_sys_xct;
766  case t_btree_ghost_reserve :
767  return t_redo | t_single_sys_xct;
768  case t_btree_foster_adopt :
769  return t_redo | t_multi | t_single_sys_xct;
770  case t_btree_split :
771  return t_redo | t_multi | t_single_sys_xct;
772  case t_btree_compress_page :
773  return t_redo | t_single_sys_xct;
774 
775  default:
776  return t_bad_cat;
777  }
778 }
779 
780 // define 0 or 1
781 // Should never use this in production. This code is in place
782 // so that we can empirically estimate the fudge factors
783 // for rollback for the various log record types.
784 #define LOGREC_ACCOUNTING 0
785 #if LOGREC_ACCOUNTING
786 class logrec_accounting_t {
787 public:
788  static void account(logrec_t &l, bool fwd);
789  static void account_end(bool fwd);
790  static void print_account_and_clear();
791 };
792 #define LOGREC_ACCOUNTING_PRINT logrec_accounting_t::print_account_and_clear();
793 #define LOGREC_ACCOUNT(x,y) \
794  if(!smlevel_0::in_recovery()) { \
795  logrec_accounting_t::account((x),(y)); \
796  }
797 #define LOGREC_ACCOUNT_END_XCT(y) \
798  if(!smlevel_0::in_recovery()) { \
799  logrec_accounting_t::account_end((y)); \
800  }
801 #else
802 #define LOGREC_ACCOUNTING_PRINT
803 #define LOGREC_ACCOUNT(x, y)
804 #define LOGREC_ACCOUNT_END_XCT(y)
805 #endif
806 
807 /*<std-footer incl-file-exclusion='LOGREC_H'> -- do not edit anything below this line -- */
808 
809 #endif // __LOGREC_H /*</std-footer>*/
uint16_t tag() const
Definition: logrec.h:540
multi_page_log_t(PageID page2_pid)
Definition: logrec.h:476
bool is_multi_page() const
Definition: logrec.h:634
multi_page_log_t * data_ssx_multi()
Definition: logrec.h:676
PageID _pid
Definition: logrec.h:82
PageID _page2_pid
Definition: logrec.h:471
void set_undo_nxt(const lsn_t &lsn)
Definition: logrec.h:535
Bitmap data structure that controls the progress of restore.
Definition: restore.h:31
const char * data_ssx() const
Definition: logrec.h:489
u_char cat() const
Definition: logrec.h:603
flag_t
Definition: logrec.h:392
StoreID _stid
Definition: logrec.h:91
#define w_assert1(x)
Level 1 should not add significant extra time.
Definition: w_base.h:198
smsize_t header_size() const
Definition: logrec.h:497
uint32_t smsize_t
Definition: basics.h:41
uint32_t _fill4
Definition: logrec.h:474
const lsn_t & page_prev_lsn() const
Definition: logrec.h:559
bool is_undo() const
Definition: logrec.h:644
const char * data() const
Definition: logrec.h:481
const lsn_t & lsn() const
Definition: logrec.h:336
A transaction. Internal to the storage manager.This class may be used in a limited way for the handli...
Definition: xct.h:185
PageID pid() const
Definition: logrec.h:506
lsn_t _xid_prv
Definition: logrec.h:124
Definition: logrec.h:181
Definition: logrec.h:179
#define w_assert3(x)
Level 3 definitely adds significant time.
Definition: w_base.h:214
bool is_cpsn() const
Definition: logrec.h:649
uint32_t StoreID
Definition: basics.h:47
A generic page view: any Zero page can be viewed as being of this type but it only exposes fields sha...
Definition: generic_page.h:121
void set_page_prev_lsn(const lsn_t &lsn)
Definition: logrec.h:573
#define alignon(p, a)
aligns a pointer p on a size a
Definition: w_base.h:327
bool is_valid() const
Definition: logrec.h:444
Base struct for log records that touch multi-pages.
Definition: logrec.h:463
static const lsn_t null
Definition: lsn.h:371
bool is_redo() const
Definition: logrec.h:630
u_char _type
Definition: logrec.h:76
Represents a transactional log record.
Definition: logrec.h:143
uint16_t _fill_vid
Definition: logrec.h:87
bool is_logical() const
Definition: logrec.h:667
const lsn_t & xid_prev() const
Definition: logrec.h:586
Definition: logrec.h:120
void set_xid_prev(tid_t tid, lsn_t last)
Definition: logrec.cpp:232
Definition: logrec.h:158
uint32_t PageID
Definition: basics.h:45
lsn_t _page2_prv
Definition: logrec.h:468
#define w_assert0(x)
Default assert/debug level is 0.
Definition: w_base.h:175
lsn_t * _lsn_ck()
Definition: logrec.h:419
Log Sequence Number. See Log Sequence Numbers (LSN).
Definition: lsn.h:243
void set_tid(tid_t tid)
Definition: logrec.h:530
tid_t tid() const
Definition: logrec.h:578
category_t
Definition: logrec.h:371
bool is_page_update() const
Definition: logrec.h:659
tid_t _xid
Definition: logrec.h:122
void init_page_info(const PagePtr p)
Definition: logrec.h:241
const lsn_t & lsn_ck() const
Definition: logrec.h:332
bool is_system() const
Definition: logrec.h:625
const lsn_t * _lsn_ck() const
Definition: logrec.h:425
static constexpr u_char get_logrec_cat(kind_t type)
Definition: logrec.h:686
void set_clr(const lsn_t &c)
Definition: logrec.h:608
bool is_single_sys_xct() const
Definition: logrec.h:672
PageID pid2() const
Definition: logrec.h:515
std::ostream & operator<<(std::ostream &os, const ConfigFile &cf)
Definition: confparser.cpp:83
xidChainLogHeader xidInfo
Definition: logrec.h:406
Definition: xct_logger.h:10
const lsn_t & page2_prev_lsn() const
Definition: logrec.h:565
bool is_skip() const
Definition: logrec.h:639
uint16_t _page_tag
Definition: logrec.h:89
lsn_t _page_prv
Definition: logrec.h:113
kind_t type() const
Definition: logrec.h:598
void set_pid(const PageID &p)
Definition: logrec.h:525
Definition: logrec.h:74
Definition: logrec.h:194
Definition: logrec.h:201
Definition: logrec.h:178
uint64_t tid_t
Definition: tid_t.h:59
void set_root_page()
Definition: logrec.h:620
uint16_t _len
Definition: logrec.h:75
const char * type_str() const
Definition: logrec.h:310
bool has_page_img(PageID page_id)
Definition: logrec.h:357
bool is_root_page() const
Definition: logrec.h:654
smsize_t length() const
Definition: logrec.h:545
const lsn_t get_lsn_ck() const
Definition: logrec.h:340
void set_lsn_ck(const lsn_t &lsn_ck)
Definition: logrec.h:345
u_char _flags
Definition: logrec.h:77
kind_t
Definition: logrec.h:149
baseLogHeader header
Definition: logrec.h:403
StoreID stid() const
Definition: logrec.h:511
const lsn_t & undo_nxt() const
Definition: logrec.h:550