Commit 5e2aaf69 authored by unknown's avatar unknown

comments

parent 086b34c9
...@@ -501,11 +501,6 @@ filter_flush_data_file_evenly(enum pagecache_page_type type, ...@@ -501,11 +501,6 @@ filter_flush_data_file_evenly(enum pagecache_page_type type,
@note MikaelR questioned why the same thread does two different jobs, the @note MikaelR questioned why the same thread does two different jobs, the
risk could be that while a checkpoint happens no LRD flushing happens. risk could be that while a checkpoint happens no LRD flushing happens.
@note MikaelR noted that he observed that Linux's file cache may never
fsync to disk until this cache is full, at which point it decides to empty
the cache, making the machine very slow. A solution was to fsync after
writing 2 MB.
*/ */
pthread_handler_t ma_checkpoint_background(void *arg) pthread_handler_t ma_checkpoint_background(void *arg)
...@@ -622,6 +617,13 @@ pthread_handler_t ma_checkpoint_background(void *arg) ...@@ -622,6 +617,13 @@ pthread_handler_t ma_checkpoint_background(void *arg)
if (filter_param.max_pages == 0) /* bunch all flushed, sleep */ if (filter_param.max_pages == 0) /* bunch all flushed, sleep */
break; /* and we will continue with the same file */ break; /* and we will continue with the same file */
dfile++; /* otherwise all this file is flushed, move to next file */ dfile++; /* otherwise all this file is flushed, move to next file */
/*
MikaelR noted that he observed that Linux's file cache may never
fsync to disk until this cache is full, at which point it decides
to empty the cache, making the machine very slow. A solution was
to fsync after writing 2 MB. So we might want to fsync() here if
we wrote enough pages.
*/
} }
filter_param.is_data_file= FALSE; filter_param.is_data_file= FALSE;
while (kfile != kfiles_end) while (kfile != kfiles_end)
......
...@@ -3568,6 +3568,10 @@ static int flush_cached_blocks(PAGECACHE *pagecache, ...@@ -3568,6 +3568,10 @@ static int flush_cached_blocks(PAGECACHE *pagecache,
PCBLOCK_NUMBER(pagecache, block), (ulong)block, PCBLOCK_NUMBER(pagecache, block), (ulong)block,
block->pins)); block->pins));
DBUG_ASSERT(block->pins == 1); DBUG_ASSERT(block->pins == 1);
/**
@todo If page is contiguous with next page to flush, group flushes in
one single my_pwrite().
*/
error= pagecache_fwrite(pagecache, file, error= pagecache_fwrite(pagecache, file,
block->buffer, block->buffer,
block->hash_link->pageno, block->hash_link->pageno,
......
...@@ -253,6 +253,11 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply, ...@@ -253,6 +253,11 @@ int maria_apply_log(LSN from_lsn, enum maria_apply_log_way apply,
there was a crash during a DDL (see comment in execution of there was a crash during a DDL (see comment in execution of
REDO_RENAME_TABLE ). REDO_RENAME_TABLE ).
*/ */
/**
@todo RECOVERY BUG instead of this warning, whenever log becomes
incomplete (ALTER TABLE, CREATE SELECT) write a log record
LOGREC_INCOMPLETE; when seeing this record, print warning below.
*/
tprint(tracef, "WARNING: MySQL server currently disables log records" tprint(tracef, "WARNING: MySQL server currently disables log records"
" about insertion of data by ALTER TABLE" " about insertion of data by ALTER TABLE"
" (copy_data_between_tables()), applying of log records may" " (copy_data_between_tables()), applying of log records may"
......
...@@ -176,8 +176,15 @@ int maria_write(MARIA_HA *info, uchar *record) ...@@ -176,8 +176,15 @@ int maria_write(MARIA_HA *info, uchar *record)
info->cur_row.checksum; info->cur_row.checksum;
} }
if (share->base.auto_key) if (share->base.auto_key)
{
/**
@todo RECOVERY BUG
if updated here, it's not recoverable (no mutex => checkpoint may see a
crazy value and flush it into the table's state on disk).
*/
set_if_bigger(info->s->state.auto_increment, set_if_bigger(info->s->state.auto_increment,
ma_retrieve_auto_increment(info, record)); ma_retrieve_auto_increment(info, record));
}
info->update= (HA_STATE_CHANGED | HA_STATE_AKTIV | HA_STATE_WRITTEN | info->update= (HA_STATE_CHANGED | HA_STATE_AKTIV | HA_STATE_WRITTEN |
HA_STATE_ROW_CHANGED); HA_STATE_ROW_CHANGED);
info->state->records+= !share->now_transactional; /*otherwise already done*/ info->state->records+= !share->now_transactional; /*otherwise already done*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment