set DIO_ALIGN_SIZE from 512 to 4096
This commit is contained in:
2
deps/oblib/src/lib/ob_define.h
vendored
2
deps/oblib/src/lib/ob_define.h
vendored
@ -1874,7 +1874,7 @@ enum ObJITEnableMode {
|
||||
|
||||
#define DATABUFFER_SERIALIZE_INFO data_buffer_.get_data(), data_buffer_.get_capacity(), data_buffer_.get_position()
|
||||
|
||||
#define DIO_ALIGN_SIZE 512
|
||||
#define DIO_ALIGN_SIZE 4096
|
||||
#define DIO_READ_ALIGN_SIZE 4096
|
||||
#define DIO_ALLOCATOR_CACHE_BLOCK_SIZE (OB_DEFAULT_MACRO_BLOCK_SIZE + DIO_READ_ALIGN_SIZE)
|
||||
#define CORO_INIT_PRIORITY 120
|
||||
|
@ -910,9 +910,7 @@ int ObLogDiskManager::copy_file_content(
|
||||
int64_t read_len = 0;
|
||||
int64_t write_len = 0;
|
||||
int64_t offset = 0;
|
||||
// CLOG and ILOG DIO aligned size are all CLOG_DIO_ALIGN_SIZE
|
||||
// SLOG DIO aligned size is DIO_ALIGN_SIZE
|
||||
int64_t align_size = SLOG_WRITE_POOL == pool_type_ ? DIO_ALIGN_SIZE : CLOG_DIO_ALIGN_SIZE;
|
||||
const int64_t align_size = DIO_ALIGN_SIZE;
|
||||
|
||||
if (!src_fd.is_valid() || file_offset < 0) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
|
@ -483,7 +483,7 @@ int ObLogFileStore::read(void* buf, int64_t count, int64_t offset, int64_t& read
|
||||
event_sz += rd_size;
|
||||
} else if (event_res == 0) { // read nothing from file
|
||||
ret = OB_READ_NOTHING;
|
||||
} else if (event_res > 0 && event_res < rd_size && (0 == event_res % DIO_ALIGN_SIZE)) { // partial complete
|
||||
} else if (event_res > 0 && event_res < rd_size) { // partial complete
|
||||
event_sz += event_res;
|
||||
COMMON_LOG(INFO, "re-submit read", K(i), K(event_res), K(rd_size), K(event_sz), K(count));
|
||||
} else {
|
||||
@ -1021,8 +1021,7 @@ int ObLogFileStore::process_io_getevents(int64_t& submitted, io_context_t ctx, s
|
||||
} else if (event_res == wr_info->size_) { // full complete
|
||||
wr_info->complete_ = true;
|
||||
wr_info->ret_ = OB_SUCCESS;
|
||||
} else if (event_res > 0 && event_res < wr_info->size_ &&
|
||||
(0 == event_res % DIO_ALIGN_SIZE)) { // partial complete
|
||||
} else if (event_res > 0 && event_res < wr_info->size_) { // partial complete
|
||||
wr_info->buf_ = wr_info->buf_ + event_res;
|
||||
wr_info->size_ -= event_res;
|
||||
wr_info->offset_ += event_res;
|
||||
|
@ -56,9 +56,9 @@ TEST_F(TestDataBuffer, test_ObSelfBufferWriter)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
int64_t big_size = 256L * 1024L * 1024L * 1024L * 1024L * 1024L; // 256TB
|
||||
ObSelfBufferWriter buf_align(1024, ObModIds::TEST, true);
|
||||
ObSelfBufferWriter buf_align(4096, ObModIds::TEST, true);
|
||||
ObSelfBufferWriter buf_not_align(0, ObModIds::TEST, false);
|
||||
ret = buf_align.ensure_space(1024);
|
||||
ret = buf_align.ensure_space(4096);
|
||||
ASSERT_EQ(ret, OB_SUCCESS);
|
||||
|
||||
ret = buf_align.ensure_space(4097);
|
||||
|
Reference in New Issue
Block a user