[OpenSRF-GIT] OpenSRF branch master updated. e71d790a92f497e5bc983c4ba970168129fbcdd3
Evergreen Git
git at git.evergreen-ils.org
Thu Feb 9 10:55:34 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenSRF".
The branch, master has been updated
via e71d790a92f497e5bc983c4ba970168129fbcdd3 (commit)
from bd5fc631abee9b5afb844ce0c5a20cacfabe12fb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e71d790a92f497e5bc983c4ba970168129fbcdd3
Author: Mike Rylander <mrylander at gmail.com>
Date: Tue Jan 10 15:30:18 2017 -0500
LP#1655449: Bundling/chunking limits for SubRquests
We need to teach subrequests to inherit parent request bundling/chunking
parameters so they don't cause overruns in dispatch mode.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/src/perl/lib/OpenSRF/AppSession.pm b/src/perl/lib/OpenSRF/AppSession.pm
index 158513b..36d56b0 100644
--- a/src/perl/lib/OpenSRF/AppSession.pm
+++ b/src/perl/lib/OpenSRF/AppSession.pm
@@ -1164,7 +1164,11 @@ sub new {
threadTrace => 0, # needed for respond in RD mode
max_chunk_count => 0, # needed for respond in RD mode
max_chunk_size => 0, # needed for respond in RD mode
- current_chunk => [], # needed for respond_complete in RD mode
+ max_bundle_size => 0,
+ current_bundle => [], # needed for respond_complete in RD mode
+ current_bundle_count=> 0,
+ current_bundle_size => 0,
+ max_bundle_count => 0,
@_
}, $class);
if ($self->session) {
diff --git a/src/perl/lib/OpenSRF/Application.pm b/src/perl/lib/OpenSRF/Application.pm
index 5d01cb5..5995f1c 100644
--- a/src/perl/lib/OpenSRF/Application.pm
+++ b/src/perl/lib/OpenSRF/Application.pm
@@ -572,14 +572,24 @@ sub method_lookup {
$meth = $self->method_lookup($method,$proto,1);
}
- $meth->session($self->session) if $meth && ref($self); # Pass the caller's session
+ if ($meth && ref($self)) {
+ $meth->session($self->session); # Pass the caller's session
+ $meth->max_chunk_size($self->max_chunk_size);
+ $meth->max_bundle_size($self->max_bundle_size);
+ }
+
return $meth;
}
sub dispatch {
my $self = shift;
$log->debug("Creating a dispatching SubRequest object", DEBUG);
- my $req = OpenSRF::AppSubrequest->new( session => $self->session, respond_directly => 1 );
+ my $req = OpenSRF::AppSubrequest->new(
+ session => $self->session,
+ max_chunk_size => $self->max_chunk_size,
+ max_bundle_size => $self->max_bundle_size,
+ respond_directly => 1
+ );
return $self->run($req, at _);
}
@@ -593,7 +603,11 @@ sub run {
if ( !UNIVERSAL::isa($req, 'OpenSRF::AppRequest') ) {
$log->debug("Creating a SubRequest object", DEBUG);
unshift @params, $req;
- $req = OpenSRF::AppSubrequest->new( session => $self->session );
+ $req = OpenSRF::AppSubrequest->new(
+ session => $self->session,
+ max_chunk_size => $self->max_chunk_size,
+ max_bundle_size => $self->max_bundle_size
+ );
} else {
$log->debug("This is a top level request", DEBUG);
}
-----------------------------------------------------------------------
Summary of changes:
src/perl/lib/OpenSRF/AppSession.pm | 6 +++++-
src/perl/lib/OpenSRF/Application.pm | 20 +++++++++++++++++---
2 files changed, 22 insertions(+), 4 deletions(-)
hooks/post-receive
--
OpenSRF
More information about the opensrf-commits
mailing list