Author: spadkins
Date: Mon Nov 26 13:28:24 2007
New Revision: 10313
Modified:
p5ee/trunk/App-WorkQueue/lib/App/WorkQueue.pm
p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm
Log:
removed a bunch of the logging that was inserted while trying to track down our
release bug (release something that was no longer in the buffer)
Modified: p5ee/trunk/App-WorkQueue/lib/App/WorkQueue.pm
==============================================================================
--- p5ee/trunk/App-WorkQueue/lib/App/WorkQueue.pm (original)
+++ p5ee/trunk/App-WorkQueue/lib/App/WorkQueue.pm Mon Nov 26 13:28:24 2007
@@ -506,7 +506,6 @@
my $context = $self->{context};
my $db = $self->_db();
$context->log("ACQUISITION FAILED :
shop_request_id[$entry->{shop_request_id}] :
subrequest_id[$entry->{subrequest_id}] :
request_status[$entry->{request_status}] : last sql stmt[$db->{sql}]\n");
- #$context->log("entry : " . Dumper($entry) .
"\nentries : " . Dumper($entries));
$entry = undef;
# the following line appears to have been a bug
#$self->_maintain_queue_buffers("release",$entry);
@@ -596,9 +595,6 @@
&App::sub_entry if ($App::trace);
my ($self, $entry, $columns, $values) = @_;
- my $context = $self->{context};
- $context->log("NOTE: _release_in_mem : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
-
my $STATUS_ACQUIRED = $self->{STATUS_ACQUIRED};
my $STATUS_RELEASED = $self->{STATUS_RELEASED};
my $status_attrib = $self->{status_attrib};
@@ -642,7 +638,6 @@
$self->_release_resources($ent);
}
else {
- $context->log("NOTE: _release_in_mem NO _release_resources
: STATUS_ACQUIRED[$STATUS_ACQUIRED] : entry[" . Dumper($ent) . "]\n");
$self->_release_resources($ent);
}
$self->update($ent,[EMAIL PROTECTED],[EMAIL PROTECTED]);
@@ -891,9 +886,6 @@
&App::sub_entry if ($App::trace);
my ($self, $entry, $columns, $values, $one_way, $raw) = @_;
- my $context = $self->{context};
- $context->log("NOTE: _update_ref : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
-
my $status_attrib = $self->{status_attrib};
if ($self->{type} eq "ARRAY") {
my $colidx = $self->_colidx();
@@ -1606,10 +1598,6 @@
foreach my $c (@$global_constraints) {
$c->[$GCONSTR_COUNTS]{$c->[$GCONSTR_COUNT_ATTRIB]} ++;
}
-
- my $context = $self->{context};
- $context->log("NOTE: _acquire_resources : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
-
}
&App::sub_exit($complies) if ($App::trace);
@@ -1646,9 +1634,6 @@
&App::sub_entry if ($App::trace);
my ($self, $entry, $constraints) = @_;
- my $context = $self->{context};
- $context->log("NOTE: _release_resources : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
-
my $global_constraints = $self->{global_constraints};
if (!$global_constraints || $#$global_constraints == -1) {
# do nothing
@@ -1751,9 +1736,6 @@
&App::sub_entry if ($App::trace);
my ($self, $op, $entry, $columns, $values) = @_;
- #my $context = $self->{context};
- #$context->log("NOTE: _maintain_queue_buffers : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
-
$op ||= "";
my $BUFFER_SIZE = $self->{BUFFER_SIZE};
Modified: p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm
==============================================================================
--- p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm (original)
+++ p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm Mon Nov 26
13:28:24 2007
@@ -303,9 +303,6 @@
&App::sub_entry if ($App::trace);
my ($self, $entry, $columns, $values) = @_;
- my $context = $self->{context};
- $context->log("NOTE: release : subrequest_id[" . $entry->{subrequest_id} .
"]\n");
-
my $status_attrib = $self->{status_attrib};
my $STATUS_ACQUIRED = $self->{STATUS_ACQUIRED};
my ($resource_counts, $resource_key, $release_without_acquire);
@@ -324,7 +321,6 @@
}
}
if ($release_without_acquire) {
- $context->log("NOTE: release.release_without_acquire is true :
subrequest_id[" . $entry->{subrequest_id} . "]\n");
$resource_counts->{total}{$resource_key}--;
}
### TODO: figure out how to maintain numbers when $released is false,
causing constraint issues
@@ -332,13 +328,11 @@
if ($released) {
$resource_counts->{buffer}{$resource_key}-- if
($release_without_acquire);
$self->_maintain_queue_buffers(undef,$entry,$columns,$values);
- $context->log("NOTE: release._release_in_mem succeeded :
subrequest_id[" . $entry->{subrequest_id} . "]\n");
}
else {
$released = $self->_release_in_db($entry,$columns,$values);
$self->_release_resources($entry) if (!$release_without_acquire);
#$resource_counts->{total}{$resource_key}-- if
(!$release_without_acquire);
- $context->log("NOTE: release._release_in_db : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
}
$self->print() if ($self->{verbose});
&App::sub_exit($released) if ($App::trace);
@@ -349,9 +343,6 @@
&App::sub_entry if ($App::trace);
my ($self, $entry, $columns, $values) = @_;
- my $context = $self->{context};
- $context->log("NOTE: _release_in_db : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
-
my @columns = ( $self->{status_attrib} );
my @values = ( $self->{STATUS_RELEASED} );
if ($columns) {
@@ -504,10 +495,6 @@
CORE::push(@$values, $self->{client_id});
}
$acquired = $db->update($self->{table}, $params, $columns, $values);
- if ($acquired) {
- my $context = $self->{context};
- $context->log("NOTE: _acquire_entry : subrequest_id[" .
$entry->{subrequest_id} . "]\n");
- }
$self->_update_ref($entry, $columns, $values) if ($acquired);
}
else {