75 typedef std::map<Key, Page>
Pages;
89 typedef std::map<std::string, std::unique_ptr<Sync_point>>
Sync_points;
116 void sync_point(
const std::string &sync_point_name);
119 const std::string &sync_point_name,
120 std::unique_ptr<Sync_point> &&sync_point_handler);
136 lsn_t newest_modification);
139 lsn_t newest_modification);
154extern std::unique_ptr<Log_test>
log_test;
172 const std::string crash_var_name = std::string{
"crash_"} + sync_point_name;
176 log_test->sync_point(sync_point_name);
uint32_t page_no_t
Page number.
Definition: api0api.h:50
Definition: log0test.h:77
virtual ~Sync_point()=default
It is a environment for tests of redo log.
Definition: log0test.h:63
void purge(lsn_t max_dirty_page_age)
Definition: log0test.cc:76
const Pages & flushed() const
Definition: log0test.cc:241
std::mutex m_purge_mutex
Definition: log0test.h:142
std::map< Key, Page > Pages
Definition: log0test.h:75
int verbosity() const
Definition: log0test.cc:277
void sync_point(const std::string &sync_point_name)
Definition: log0test.cc:245
void set_verbosity(int level)
Definition: log0test.cc:279
void recovered_add(Key key, Value value, lsn_t oldest_modification, lsn_t newest_modification)
Definition: log0test.cc:229
uint64_t m_options_enabled
Definition: log0test.h:148
Pages m_flushed
Definition: log0test.h:145
void fsync_written_pages()
Definition: log0test.cc:66
void register_sync_point_handler(const std::string &sync_point_name, std::unique_ptr< Sync_point > &&sync_point_handler)
Definition: log0test.cc:255
Pages m_recovered
Definition: log0test.h:146
void set_enabled(Options option, bool enabled)
Definition: log0test.cc:265
Pages m_written
Definition: log0test.h:144
int flush_every() const
Definition: log0test.cc:273
std::mutex m_mutex
Definition: log0test.h:141
void recovered_reset(Key key, lsn_t oldest_modification, lsn_t newest_modification)
Definition: log0test.cc:218
static byte * create_mlog_rec(byte *rec, Key key, Value value, size_t payload)
Definition: log0test.cc:123
std::map< lsn_t, Page > m_buf
Definition: log0test.h:143
int m_flush_every
Definition: log0test.h:150
bool enabled(Options option) const
Definition: log0test.cc:261
const Pages & recovered() const
Definition: log0test.cc:243
Sync_points m_sync_points
Definition: log0test.h:147
int64_t Value
Definition: log0test.h:66
static byte * parse_mlog_rec(byte *begin, byte *end, Key &key, Value &value, lsn_t &start_lsn, lsn_t &end_lsn)
Definition: log0test.cc:162
int m_verbosity
Definition: log0test.h:149
void add_dirty_page(const Page &page)
Definition: log0test.cc:55
void set_flush_every(int flush_every)
Definition: log0test.cc:275
Options
Definition: log0test.h:84
@ VALIDATE_RECENT_WRITTEN
lsn_t oldest_modification_approx() const
Calculates oldest_modification of the earliest added dirty page during the test in log0log-t.
Definition: log0test.cc:49
std::map< std::string, std::unique_ptr< Sync_point > > Sync_points
Definition: log0test.h:89
page_no_t Key
Definition: log0test.h:65
a nullable SQL value.
Definition: sql_value.h:40
int page
Definition: ctype-mb.cc:1236
Declarations for the Debug Sync Facility.
#define CONDITIONAL_SYNC_POINT(NAME)
Definition: debug_sync.h:128
std::unique_ptr< Log_test > log_test
Represents currently running test of redo log, nullptr otherwise.
Definition: log0test.cc:47
static void log_sync_point(const char(&sync_point_name)[N])
This function is responsible for three actions:
Definition: log0test.h:169
uint64_t lsn_t
Type used for all log sequence number storage and arithmetic.
Definition: log0types.h:63
#define DBUG_EXECUTE_IF(keyword, a1)
Definition: my_dbug.h:171
#define DBUG_SUICIDE()
Definition: my_dbug.h:228
Common header for many mysys elements.
std::atomic< Type > N
Definition: ut0counter.h:225
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Definition: log0test.h:68
lsn_t oldest_modification
Definition: log0test.h:71
Key key
Definition: log0test.h:69
Value value
Definition: log0test.h:70
lsn_t newest_modification
Definition: log0test.h:72