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

Make _batchRequestQueue const #1769

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

bernardnormier
Copy link
Member

@bernardnormier bernardnormier commented Feb 8, 2024

This is a small update to Proxy to make its _bachRequestQueue data member const.

@pepone
Copy link
Member

pepone commented Feb 8, 2024

There is PHP test failure

*** [15/21] Running php/Ice/operations tests ***
[ running client/server test - 02/08/24 04:19:09 ]
- Config: tcp
(/Users/runner/work/ice/ice/cpp/test/Ice/operations/build/macosx/shared/server --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.NullHandleAbort=1 --Ice.PrintStackTraces=1 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1)
(php -n -d extension_dir='/Users/runner/work/ice/ice/php/lib' -d extension='ice.so' -d include_path='/Users/runner/work/ice/ice/php/lib' -f /Users/runner/work/ice/ice/php/test/TestHelper.php -- Client --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 env={'DYLD_LIBRARY_PATH': '/Users/runner/work/ice/ice/cpp/lib'})
testing twoway operations... ok
#0 /Users/runner/work/ice/ice/php/test/Ice/operations/Client.php(1029): Ice\ObjectPrx->ice_flushBatchRequests()
#1 /Users/runner/work/ice/ice/php/test/Ice/operations/Client.php(1043): allTests(Object(Client))
#2 /Users/runner/work/ice/ice/php/test/TestHelper.php(205): Client->run(Array)
#3 /Users/runner/work/ice/ice/php/test/TestHelper.php(227): TestHelper::runTest(Array)
#4 {main}

_reference(other._reference)
Ice::ObjectPrx::ObjectPrx(const ReferencePtr& ref) noexcept :
_reference(ref),
_batchRequestQueue(ref->isBatch() ? _reference->getBatchRequestQueue() : nullptr)
Copy link
Member

Choose a reason for hiding this comment

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

Is this a change in behavior? In the previous implementation of _getBatchRequestQueue we always grabbed the request queue from reference.

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a slight change of behavior:

  • for regular proxies: no change in behavior
  • for fixed proxies:
    • before: calling flushBatchRequest on any fixed proxy flushes the batch request queue of the underlying connection
    • after: calling flushBatchRequest on a fixed proxy that is not batch does not flush the batch request queue of the underlying connection

If desired, I can restore the old behavior.

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with either behavior.

@bernardnormier
Copy link
Member Author

There is PHP test failure

*** [15/21] Running php/Ice/operations tests ***
[ running client/server test - 02/08/24 04:19:09 ]
- Config: tcp
(/Users/runner/work/ice/ice/cpp/test/Ice/operations/build/macosx/shared/server --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.NullHandleAbort=1 --Ice.PrintStackTraces=1 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1)
(php -n -d extension_dir='/Users/runner/work/ice/ice/php/lib' -d extension='ice.so' -d include_path='/Users/runner/work/ice/ice/php/lib' -f /Users/runner/work/ice/ice/php/test/TestHelper.php -- Client --Ice.Default.Host=127.0.0.1 --Test.BasePort=14000 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 env={'DYLD_LIBRARY_PATH': '/Users/runner/work/ice/ice/cpp/lib'})
testing twoway operations... ok
#0 /Users/runner/work/ice/ice/php/test/Ice/operations/Client.php(1029): Ice\ObjectPrx->ice_flushBatchRequests()
#1 /Users/runner/work/ice/ice/php/test/Ice/operations/Client.php(1043): allTests(Object(Client))
#2 /Users/runner/work/ice/ice/php/test/TestHelper.php(205): Client->run(Array)
#3 /Users/runner/work/ice/ice/php/test/TestHelper.php(227): TestHelper::runTest(Array)
#4 {main}

The issue is PHP is testing flushBatchRequest on a non-batch proxy ... which we don't test anywhere else. Fixing...

@bernardnormier bernardnormier merged commit 2d3a545 into zeroc-ice:main Feb 8, 2024
17 checks passed
@bernardnormier bernardnormier deleted the batch-request-queue branch May 10, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants