Merge "Lower the log level for falling back to mkstemp"
This commit is contained in:
commit
b515d7fc20
@ -1696,7 +1696,7 @@ class BaseDiskFileWriter(object):
|
|||||||
msg = 'open(%s, O_TMPFILE | O_WRONLY) failed: %s \
|
msg = 'open(%s, O_TMPFILE | O_WRONLY) failed: %s \
|
||||||
Falling back to using mkstemp()' \
|
Falling back to using mkstemp()' \
|
||||||
% (self._datadir, os.strerror(err.errno))
|
% (self._datadir, os.strerror(err.errno))
|
||||||
self.logger.warning(msg)
|
self.logger.debug(msg)
|
||||||
self.manager.use_linkat = False
|
self.manager.use_linkat = False
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
@ -5217,7 +5217,11 @@ class DiskFileMixin(BaseDiskFileTestMixin):
|
|||||||
# Once opening file with O_TMPFILE has failed,
|
# Once opening file with O_TMPFILE has failed,
|
||||||
# failure is cached to not try again
|
# failure is cached to not try again
|
||||||
self.assertFalse(df.manager.use_linkat)
|
self.assertFalse(df.manager.use_linkat)
|
||||||
|
# Now that we try to use O_TMPFILE all the time, log at debug
|
||||||
|
# instead of warning
|
||||||
log = df.manager.logger.get_lines_for_level('warning')
|
log = df.manager.logger.get_lines_for_level('warning')
|
||||||
|
self.assertFalse(log)
|
||||||
|
log = df.manager.logger.get_lines_for_level('debug')
|
||||||
self.assertGreater(len(log), 0)
|
self.assertGreater(len(log), 0)
|
||||||
self.assertTrue('O_TMPFILE' in log[-1])
|
self.assertTrue('O_TMPFILE' in log[-1])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user