[open-ils-commits] r18565 - in trunk/Open-ILS: src/perlmods/OpenILS/Application/Acq web/js/ui/default/acq/common (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 1 19:22:54 EDT 2010
Author: gmc
Date: 2010-11-01 19:22:53 -0400 (Mon, 01 Nov 2010)
New Revision: 18565
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
Log:
yet another replication race condition fix
Fixes problems that can occur when creating a lineitem
from an existing bib in the catalog; adds an authoritative
version of open-ils.acq.lineitem.retrieve.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2010-11-01 21:22:06 UTC (rev 18564)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2010-11-01 23:22:53 UTC (rev 18565)
@@ -69,6 +69,7 @@
__PACKAGE__->register_method(
method => 'retrieve_lineitem',
api_name => 'open-ils.acq.lineitem.retrieve',
+ authoritative => 1,
signature => {
desc => 'Retrieves a lineitem',
params => [
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm 2010-11-01 21:22:06 UTC (rev 18564)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm 2010-11-01 23:22:53 UTC (rev 18565)
@@ -602,10 +602,12 @@
$logger->info("created @li_ids new lineitems for picklist $picklist");
- # new editor, no transaction needed this time
- $e = new_editor("authtoken" => $auth) or return $e->die_event;
+ # new editor, but still using transaction to ensure correct retrieval
+ # in a replicated setup
+ $e = new_editor("authtoken" => $auth, xact => 1) or return $e->die_event;
return $e->die_event unless $e->checkauth;
$conn->respond($RETRIEVERS{"lineitem"}->($e, $_, $opts)) foreach @li_ids;
+ $e->rollback;
$e->disconnect;
undef;
Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-11-01 21:22:06 UTC (rev 18564)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-11-01 23:22:53 UTC (rev 18565)
@@ -794,7 +794,7 @@
return handler(li);
fieldmapper.standardRequest(
- ['open-ils.acq', 'open-ils.acq.lineitem.retrieve'],
+ ['open-ils.acq', 'open-ils.acq.lineitem.retrieve.authoritative'],
{ async: true,
params: [self.authtoken, liId, {
More information about the open-ils-commits
mailing list