Replace the cumulative average with a rolling average
to better expose variations within IOS/sec and bytes/sec.
Fixes: #9374
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
CID 1160858 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)
nonvirtual_dtor: Class RGWLoadGenRequest has a destructor
and a pointer to it is upcast to class RGWRequest which doesn't
have a virtual destructor.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1188142 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Passing parameter header of type
GenericObjectMap::_Header (size 176 bytes) by value.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1135926 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Catching an exception object of size 264 bytes by value.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1021214 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking cb_args suggests that it may be
null, but it has already been dereferenced on all paths leading to
the check.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1238905 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member want_state is not initialized
in this constructor nor in any functions that it calls.
uninit_member: Non-static class member last_send is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix Coverity issue, preinit with 0:
uninit_member: Non-static class member chunk_count is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1238903 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member data_chunk_count is not
initialized in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1238904 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.seq when calling
log_to_syslog.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Release my_completion4.
CID 1219581 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable my_completion4 going out of scope leaks
the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
During bootstrap we verify that our paxos commits overlap with the other
mons we will form a quorum with. If they do not, we do a sync.
However, it is possible we pass those checks, then fail to join a quorum
before the quorum moves ahead in time such that we no longer overlap.
Currently nothing kicks up back into a probing state to discover we need
to sync... we will just keep trying to call or join an election instead.
Fix this by jumping back to bootstrap if we get a probe that is ahead of
us. Only do this from non probe or sync states as these will be common;
it is only the active and electing states that matter (and probably just
electing!).
Fixes: #9301
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
peon last_committed + 1 == leader first_committed is okay. Note that the
other check (where I clean up whitespace) gets this correct.
Fixes: #9301 (partly)
Signed-off-by: Sage Weil <sage@redhat.com>
Previously the code was there for storing in
the SessionMap table, but not for the ESession
logevent.
Fixes: #9518
Signed-off-by: John Spray <john.spray@redhat.com>
Preserve ordering of readdir result in a list, so that the result of cached
readdir is consistant with uncached readdir.
As a side effect, this commit also removes the code that removes stale dentries.
This is OK because stale dentries does not have valid lease, they will be
filter out by the shared gen check in Client::_readdir_cache_cb()
Signed-off-by: Yan, Zheng <zyan@redhat.com>
When creating a file, Client::insert_dentry_inode() set the dentry's offset
based on directory's max offset. The offset does not reflect the real
postion of the dentry in directory. Later readdir reply from real postion
of the dentry in directory. Later readdir reply from MDS may change the
dentry's position/offset. This inconsistency can cause missing/duplicate
entries in readdir result if readdir is partly satisfied by dcache_readdir().
The fix is introduce a new flag indicating if dentries in directory are
sorted. We use _readdir_cache_cb() to handle readdir only when the flag is
set, clear the flag after creating/deleting/renaming file.
Fixes: #9178
Signed-off-by: Yan, Zheng <zyan@redhat.com>