Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librados: only call watch_flush if necessary #3243

Merged
1 commit merged into from Dec 23, 2014
Merged

Conversation

yuyuyu101
Copy link
Member

Fix bug #10424
Signed-off-by: Haomai Wang haomaiwang@gmail.com

@ghost ghost self-assigned this Dec 23, 2014
@ghost ghost added bug-fix core labels Dec 23, 2014
@@ -283,7 +283,8 @@ int librados::RadosClient::connect()
void librados::RadosClient::shutdown()
{
// make sure watch callbacks are flushed
watch_flush();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to move it down to the if (need_objecter) ?

Fix bug ceph#10424
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
@ghost
Copy link

ghost commented Dec 23, 2014

$ libtool --mode=execute valgrind --tool=memcheck ./unittest_librados
==31815== Memcheck, a memory error detector
==31815== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==31815== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==31815== Command: /home/loic/software/ceph/ceph/src/.libs/lt-unittest_librados
==31815== 
Running main() from gtest_main.cc
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Librados
[ RUN      ] Librados.CreateShutdown
[       OK ] Librados.CreateShutdown (336 ms)
[----------] 1 test from Librados (348 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (386 ms total)
[  PASSED  ] 1 test.
==31815== 
==31815== HEAP SUMMARY:
==31815==     in use at exit: 0 bytes in 0 blocks
==31815==   total heap usage: 731 allocs, 731 frees, 92,086 bytes allocated
==31815== 
==31815== All heap blocks were freed -- no leaks are possible
==31815== 
==31815== For counts of detected and suppressed errors, rerun with: -v
==31815== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

@ghost
Copy link

ghost commented Dec 23, 2014

$ libtool --mode=execute valgrind --tool=memcheck ./unittest_librados_config
==31962== Memcheck, a memory error detector
==31962== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==31962== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==31962== Command: /home/loic/software/ceph/ceph/src/.libs/lt-unittest_librados_config
==31962== 
Running main() from gtest_main.cc
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from LibRadosConfig
[ RUN      ] LibRadosConfig.SimpleSet
[       OK ] LibRadosConfig.SimpleSet (359 ms)
[ RUN      ] LibRadosConfig.ArgV
[       OK ] LibRadosConfig.ArgV (44 ms)
[ RUN      ] LibRadosConfig.DebugLevels
[       OK ] LibRadosConfig.DebugLevels (30 ms)
[----------] 3 tests from LibRadosConfig (444 ms total)
[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (484 ms total)
[  PASSED  ] 3 tests.
==31962== 
==31962== HEAP SUMMARY:
==31962==     in use at exit: 0 bytes in 0 blocks
==31962==   total heap usage: 2,010 allocs, 2,010 frees, 173,345 bytes allocated
==31962== 
==31962== All heap blocks were freed -- no leaks are possible
==31962== 
==31962== For counts of detected and suppressed errors, rerun with: -v
==31962== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

@loic-bot
Copy link

SUCCESS: the output of run-make-check.sh on 8869099 is http://paste.ubuntu.com/9602864/

:octocat: Sent from GH.

@loic-bot
Copy link

SUCCESS: the output of run-make-check.sh on 7978b26 is http://paste.ubuntu.com/9602922/

:octocat: Sent from GH.

@ghost
Copy link

ghost commented Dec 23, 2014

Valgrind clean as above with the updated modification.

ghost pushed a commit that referenced this pull request Dec 23, 2014
librados: only call watch_flush if necessary

Reviewed-by: Loic Dachary <ldachary@redhat.com>
@ghost ghost merged commit bb01f9e into ceph:master Dec 23, 2014
@yuyuyu101 yuyuyu101 deleted the wip-10424 branch September 9, 2016 14:25
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants