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

Use MQCMD_INQUIRE_Q instead of queue.inquire #3997

Merged

Conversation

AlexandreYang
Copy link
Member

@AlexandreYang AlexandreYang commented Jun 27, 2019

What does this PR do?

Since we added support for local queues, when a local queue is assigned to a cluster, the method queue.inquire will raise this warning: WARNING: MQRC_SELECTOR_NOT_FOR_TYPE

But using MQCMD_INQUIRE_Q does not have this issue. That will also avoid calling the IBM MQ server only once instead of once per attribute we want to get.

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • Feature or bugfix must have tests
  • Git history must be clean
  • If PR adds a configuration option, it must be added to the configuration file.

@AlexandreYang AlexandreYang requested a review from a team as a code owner June 27, 2019 21:17
@AlexandreYang AlexandreYang force-pushed the alex/ibm_mq/fix_inquire_queue_belonging_to_a_cluster branch from abb8c06 to e55853b Compare June 28, 2019 18:36
@AlexandreYang AlexandreYang force-pushed the alex/ibm_mq/fix_inquire_queue_belonging_to_a_cluster branch from e55853b to 8a51945 Compare July 2, 2019 07:33
@codecov
Copy link

codecov bot commented Jul 2, 2019

Codecov Report

Merging #3997 into master will decrease coverage by 1.42%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3997      +/-   ##
==========================================
- Coverage   86.09%   84.66%   -1.43%     
==========================================
  Files         763       10     -753     
  Lines       41367      450   -40917     
  Branches     5061       55    -5006     
==========================================
- Hits        35613      381   -35232     
+ Misses       4365       59    -4306     
+ Partials     1389       10    -1379

1 similar comment
@codecov
Copy link

codecov bot commented Jul 2, 2019

Codecov Report

Merging #3997 into master will decrease coverage by 1.42%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3997      +/-   ##
==========================================
- Coverage   86.09%   84.66%   -1.43%     
==========================================
  Files         763       10     -753     
  Lines       41367      450   -40917     
  Branches     5061       55    -5006     
==========================================
- Hits        35613      381   -35232     
+ Misses       4365       59    -4306     
+ Partials     1389       10    -1379

@hithwen
Copy link
Contributor

hithwen commented Jul 2, 2019

That will also avoid calling the IBM MQ server only once instead of once per attribute we want to get.

I don't understand what you mean there

@AlexandreYang AlexandreYang changed the title Use MQCMD_INQUIRE_Q instead of queue.inquire [DO NOT MERGE] Use MQCMD_INQUIRE_Q instead of queue.inquire Jul 2, 2019
@AlexandreYang
Copy link
Member Author

AlexandreYang commented Jul 2, 2019

This change is also included in #3977

Careful when merging/rebasing the other PR #3977.

@AlexandreYang
Copy link
Member Author

That will also avoid calling the IBM MQ server only once instead of once per attribute we want to get.

I don't understand what you mean there

Previously, we call queue.inquire(pymqi_value) for each attribute of a specific queue (x30 queue metrics)

Now, calling pcf.MQCMD_INQUIRE_Q(args) retrieve all attributes of the queue at once. Then we process those queue attributes to submit the metrics.

@AlexandreYang AlexandreYang changed the title [DO NOT MERGE] Use MQCMD_INQUIRE_Q instead of queue.inquire Use MQCMD_INQUIRE_Q instead of queue.inquire Jul 2, 2019
@AlexandreYang AlexandreYang merged commit e68600a into master Jul 4, 2019
@AlexandreYang AlexandreYang deleted the alex/ibm_mq/fix_inquire_queue_belonging_to_a_cluster branch July 13, 2019 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants