Merge lp:~zorba-coders/zorba/bug-986377 into lp:zorba

Proposed by Matthias Brantner
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 10804
Merged at revision: 10843
Proposed branch: lp:~zorba-coders/zorba/bug-986377
Merge into: lp:zorba
Diff against target: 132 lines (+10/-24)
8 files modified
ChangeLog (+1/-0)
include/zorba/pregenerated/diagnostic_list.h (+0/-2)
modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+0/-4)
src/diagnostics/diagnostic_en.xml (+0/-4)
src/diagnostics/pregenerated/diagnostic_list.cpp (+0/-3)
src/diagnostics/pregenerated/dict_en.cpp (+0/-1)
src/store/naive/pul_primitives.cpp (+1/-9)
src/store/naive/simple_pul.cpp (+8/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-986377
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Matthias Brantner Approve
Review via email: mp+105911@code.launchpad.net

This proposal supersedes a proposal from 2012-04-27.

Commit message

- no undo is done for collection truncate
- fix for bug #986377 "do not apply any updates on collection if it is to be truncated"

Description of the change

- no undo is done for collection truncate
- fix for bug #986377 "do not apply any updates on collection if it is to be truncated"

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~zorba-coders/zorba/bug-986377 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-986377-2012-04-27T17-11-02.437Z is finished. The
  final status was:

  5 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Markos Zaharioudakis (markos-za) wrote : Posted in a previous version of this proposal

Can collection truncation raise any errors? If not, then it's better to move it in finalizeUpdates. The reason is that with the current impementation, in the case where the PyulImpl::applyUpdates raises errors, you don't really know if the truncation was done or not.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~zorba-coders/zorba/bug-986377 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-986377-2012-05-15T21-53-24.114Z is finished. The
  final status was:

  4 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-986377-2012-05-16T00-35-19.597Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 2 Pending.

Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-986377-2012-05-16T06-13-58.672Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2012-05-15 21:12:27 +0000
+++ ChangeLog 2012-05-16 00:13:22 +0000
@@ -53,6 +53,7 @@
53 * Fixed bug #906494 (default compile with D_FILE_OFFSET_BITS=64)53 * Fixed bug #906494 (default compile with D_FILE_OFFSET_BITS=64)
54 * Fixed bug #988412 (date:current-dateTime daylight saving)54 * Fixed bug #988412 (date:current-dateTime daylight saving)
55 * Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)55 * Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)
56 * Fixed bug #986377 (do not apply any updates on collection if it is to be truncated)
56 * Fixed bug #921458 (file:read-text-lines() blocking)57 * Fixed bug #921458 (file:read-text-lines() blocking)
57 * Fixed bug #981405 (do not hoist expr containing try-catch variables out of the associated try-catch expression)58 * Fixed bug #981405 (do not hoist expr containing try-catch variables out of the associated try-catch expression)
58 * Fixed bug #996084 (crash in Streamable*Item with file module)59 * Fixed bug #996084 (crash in Streamable*Item with file module)
5960
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2012-05-13 15:33:57 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2012-05-16 00:13:22 +0000
@@ -588,8 +588,6 @@
588588
589extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0018_NODES_NOT_IN_SAME_COLLECTION;589extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0018_NODES_NOT_IN_SAME_COLLECTION;
590590
591extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0019_UNDO_NOT_POSSIBLE;
592
593extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0020_INDEX_DOMAIN_NODE_NOT_IN_COLLECTION;591extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0020_INDEX_DOMAIN_NODE_NOT_IN_COLLECTION;
594592
595extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0021_INDEX_NOT_DECLARED;593extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0021_INDEX_NOT_DECLARED;
596594
=== modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq'
--- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-05-13 15:33:57 +0000
+++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-05-16 00:13:22 +0000
@@ -466,10 +466,6 @@
466466
467(:~467(:~
468:)468:)
469declare variable $zerr:ZDDY0019 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0019");
470
471(:~
472:)
473declare variable $zerr:ZDDY0020 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0020");469declare variable $zerr:ZDDY0020 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0020");
474470
475(:~471(:~
476472
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2012-05-13 15:33:57 +0000
+++ src/diagnostics/diagnostic_en.xml 2012-05-16 00:13:22 +0000
@@ -2056,10 +2056,6 @@
2056 <value>all nodes must be in same collection</value>2056 <value>all nodes must be in same collection</value>
2057 </diagnostic>2057 </diagnostic>
20582058
2059 <diagnostic code="ZDDY0019" name="UNDO_NOT_POSSIBLE">
2060 <value>"$1": collection $2 cannot be undone</value>
2061 </diagnostic>
2062
2063 <diagnostic code="ZDDY0020" name="INDEX_DOMAIN_NODE_NOT_IN_COLLECTION">2059 <diagnostic code="ZDDY0020" name="INDEX_DOMAIN_NODE_NOT_IN_COLLECTION">
2064 <value>"$1": index domain expression yields nodes that are not in collection</value>2060 <value>"$1": index domain expression yields nodes that are not in collection</value>
2065 </diagnostic>2061 </diagnostic>
20662062
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2012-05-13 15:33:57 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2012-05-16 00:13:22 +0000
@@ -861,9 +861,6 @@
861ZorbaErrorCode ZDDY0018_NODES_NOT_IN_SAME_COLLECTION( "ZDDY0018" );861ZorbaErrorCode ZDDY0018_NODES_NOT_IN_SAME_COLLECTION( "ZDDY0018" );
862862
863863
864ZorbaErrorCode ZDDY0019_UNDO_NOT_POSSIBLE( "ZDDY0019" );
865
866
867ZorbaErrorCode ZDDY0020_INDEX_DOMAIN_NODE_NOT_IN_COLLECTION( "ZDDY0020" );864ZorbaErrorCode ZDDY0020_INDEX_DOMAIN_NODE_NOT_IN_COLLECTION( "ZDDY0020" );
868865
869866
870867
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2012-05-13 15:33:57 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2012-05-16 00:13:22 +0000
@@ -287,7 +287,6 @@
287 { "ZDDY0016", "\"$1\": multiple attemps to create a collection in the same snapshot" },287 { "ZDDY0016", "\"$1\": multiple attemps to create a collection in the same snapshot" },
288 { "ZDDY0017", "node does not belong to any collection" },288 { "ZDDY0017", "node does not belong to any collection" },
289 { "ZDDY0018", "all nodes must be in same collection" },289 { "ZDDY0018", "all nodes must be in same collection" },
290 { "ZDDY0019", "\"$1\": collection $2 cannot be undone" },
291 { "ZDDY0020", "\"$1\": index domain expression yields nodes that are not in collection" },290 { "ZDDY0020", "\"$1\": index domain expression yields nodes that are not in collection" },
292 { "ZDDY0021", "\"$1\": undeclared index" },291 { "ZDDY0021", "\"$1\": undeclared index" },
293 { "ZDDY0022", "\"$1\": index already exists" },292 { "ZDDY0022", "\"$1\": index already exists" },
294293
=== modified file 'src/store/naive/pul_primitives.cpp'
--- src/store/naive/pul_primitives.cpp 2012-05-03 12:31:51 +0000
+++ src/store/naive/pul_primitives.cpp 2012-05-16 00:13:22 +0000
@@ -1283,19 +1283,11 @@
1283 assert(lColl);1283 assert(lColl);
1284 1284
1285 lColl->removeAll();1285 lColl->removeAll();
1286 theIsApplied = true;
1287
1288}1286}
12891287
1290void UpdTruncateCollection::undo()1288void UpdTruncateCollection::undo()
1291{1289{
1292 if (!theIsApplied) return;1290 // NOOP
1293
1294 throw ZORBA_EXCEPTION(
1295 zerr::ZDDY0019_UNDO_NOT_POSSIBLE,
1296 ERROR_PARAMS( theName->getStringValue(), "truncation" )
1297 );
1298
1299}1291}
13001292
13011293
13021294
=== modified file 'src/store/naive/simple_pul.cpp'
--- src/store/naive/simple_pul.cpp 2012-05-03 12:31:51 +0000
+++ src/store/naive/simple_pul.cpp 2012-05-16 00:13:22 +0000
@@ -2288,6 +2288,14 @@
2288 if (!theDeleteCollectionList.empty())2288 if (!theDeleteCollectionList.empty())
2289 return;2289 return;
22902290
2291 // if the collection is truncated, no other primitive needs to be applied
2292 if (!theTruncateCollectionList.empty())
2293 {
2294 applyList(theTruncateCollectionList);
2295 theIsApplied = true;
2296 return;
2297 }
2298
2291 try2299 try
2292 {2300 {
2293 // Compute the before-delta for each incrementally maintained index.2301 // Compute the before-delta for each incrementally maintained index.
@@ -2379,7 +2387,6 @@
2379 applyList(theCreateCollectionList);2387 applyList(theCreateCollectionList);
2380 applyList(theInsertIntoCollectionList);2388 applyList(theInsertIntoCollectionList);
2381 applyList(theDeleteFromCollectionList);2389 applyList(theDeleteFromCollectionList);
2382 applyList(theTruncateCollectionList);
23832390
2384 // Compute the after-delta for each incrementally maintained index.2391 // Compute the after-delta for each incrementally maintained index.
2385 computeIndexAfterDeltas();2392 computeIndexAfterDeltas();

Subscribers

People subscribed via source and target branches