-
Notifications
You must be signed in to change notification settings - Fork 140
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
Feat[Storagetool]: List queue appid numrecords #534
base: main
Are you sure you want to change the base?
Feat[Storagetool]: List queue appid numrecords #534
Conversation
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Aleksandr Ivanov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
608ae0c
to
185194d
Compare
"min number of records per queue for detailed info to be displayed", | ||
balcl::TypeInfo(&arguments.d_minRecordsPerQueue), | ||
balcl::OccurrenceInfo( | ||
bsl::numeric_limits<bsls::Types::Int64>::max())}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider to use zero as default value. In most configs usually zero is used as default to turn off the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try to use Uint64, but balcl::TypeInfo does not support it. So I had to switch to Int64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed in person I keep Int64 for cmd line argument and use Uint64 in Parameters class.
src/applications/bmqstoragetool/m_bmqstoragetool_journalfileprocessor.cpp
Outdated
Show resolved
Hide resolved
src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.h
Outdated
Show resolved
Hide resolved
src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp
Outdated
Show resolved
Hide resolved
src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp
Outdated
Show resolved
Hide resolved
src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp
Outdated
Show resolved
Hide resolved
src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexander Ivanov <[email protected]> Signed-off-by: Dmitrii Petukhov <[email protected]>
Co-authored-by: Alexander Ivanov <[email protected]> Signed-off-by: Dmitrii Petukhov <[email protected]>
Co-authored-by: Alexander Ivanov <[email protected]> Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.h
Outdated
Show resolved
Hide resolved
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
1d1fc97
to
1ef7d9b
Compare
Signed-off-by: Dmitrii Petukhov <[email protected]>
9d70563
to
ff069a3
Compare
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
dd1a0a7
to
313e91e
Compare
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
74f5f11
to
988cccf
Compare
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
3633b88
to
c3a2fc8
Compare
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
Signed-off-by: Dmitrii Petukhov <[email protected]>
5b31e2b
to
e28074b
Compare
Merged with upstream main. Ready for review. |
// Prepare expected output | ||
bmqu::MemOutStream expectedStream(bmqtst::TestHelperUtil::allocator()); | ||
expectedStream << "5 message(s) found.\n"; | ||
bsl::vector<const char*> fields(bmqtst::TestHelperUtil::allocator()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed to fix now, but I opened an issue for this thing
#564
@@ -106,6 +106,9 @@ struct CommandLineArguments { | |||
bool d_confirmed; | |||
/// Show only messages, confirmed by some of the appId's | |||
bool d_partiallyConfirmed; | |||
// Show only messages, confirmed by some of the appId's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like comment duplication here and below. Consider to use ///
as for other cases.
@@ -204,6 +204,22 @@ void outputFooter(bsl::ostream& ostream, | |||
// class SearchResult | |||
// ================== | |||
|
|||
bool SearchResult::processQueueOpRecord( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SearchResult
is an interface and has no implementation. Why do we need dummy implementation for these methods?
@@ -192,7 +192,7 @@ | |||
|
|||
#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES | |||
// Include version that can be compiled with C++03 | |||
// Generated on Tue Oct 15 17:39:53 2024 | |||
// Generated on Thu Jan 9 16:44:32 2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems it is not needed to update these files.
NB: This PR depends on #531 and will be ready for review as soon as #531 is merged
Describe your changes
Added new functional to bmqstoragetool to list number of all types of records per queue.
Supported resolution of Queue Key and App Key.
Added extra cmd line arg
--min-records-per-queue <threshold>
to restrict displaying queues with low number of records (less than given threshold)Testing performed
Additional context
Usage example:
./bmqstoragetool.tsk --summary --min-records-per-queue 1012012 --journal-file file.bmq_journal --csl-file file.bmq_csl
Sample Output (section related to this PR):
Sample Output showcasing the resolution of Queue Key and App Key:
Run without CSL file:
Run with CSL file (i.e. --csl-file ./bmq_csl_20240930_090323_CF83E8E13A.bmq_csl):