Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6, 10.11, 11.4, 11.8, 12.3
-
Can result in unexpected behaviour
Description
In the MDEV-37949 development branch, the test innodb.log_archive is failing on FreeBSD because posix_fallocate() would return EOPNOTSUPP and the pwrite based fallback would fail the operation unless the following condition is not removed:
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
|
index 8cf761545f3..72f6bab82f9 100644
|
--- a/storage/innobase/os/os0file.cc
|
+++ b/storage/innobase/os/os0file.cc
|
@@ -1606,8 +1606,7 @@ bool os_file_set_size(const char *name, os_file_t file, os_offset_t size,
|
/* Write buffer full of zeros */
|
memset(buf, 0, buf_size);
|
|
- while (current_size < size
|
- && srv_shutdown_state <= SRV_SHUTDOWN_INITIATED) {
|
+ while (current_size < size) {
|
ulint n_bytes;
|
|
if (size - current_size < (os_offset_t) buf_size) { |
I don’t see a reason to abort any file extension operation during shutdown. In MDEV-37949 the scenario for hitting this is as follows:
- A zero-length innodb_log_archive file is artificially created by the test case, to simulate a crash during a code path where a new log file is being written.
- The server is started and shut down.
- On shutdown, the checkpoint is expected to be written to the log file that had been created incompletely.
- Because of the above faulty logic, the attempt to extend the file would fail and the server would intentionally crash.
Attachments
Issue Links
- blocks
-
MDEV-37949 Implement innodb_log_archive
-
- Approved
-