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

Proposed by Matthias Brantner
Status: Superseded
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
Matthias Brantner Approve
Markos Zaharioudakis Pending
Review via email: mp+103908@code.launchpad.net

This proposal has been superseded by a proposal from 2012-05-16.

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) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

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 :

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 :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

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

lp:~zorba-coders/zorba/bug-986377 updated
10804. By Matthias Brantner

updated pregenerated files

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-05-15 21:12:27 +0000
3+++ ChangeLog 2012-05-16 00:10:25 +0000
4@@ -53,6 +53,7 @@
5 * Fixed bug #906494 (default compile with D_FILE_OFFSET_BITS=64)
6 * Fixed bug #988412 (date:current-dateTime daylight saving)
7 * Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)
8+ * Fixed bug #986377 (do not apply any updates on collection if it is to be truncated)
9 * Fixed bug #921458 (file:read-text-lines() blocking)
10 * Fixed bug #981405 (do not hoist expr containing try-catch variables out of the associated try-catch expression)
11 * Fixed bug #996084 (crash in Streamable*Item with file module)
12
13=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
14--- include/zorba/pregenerated/diagnostic_list.h 2012-05-13 15:33:57 +0000
15+++ include/zorba/pregenerated/diagnostic_list.h 2012-05-16 00:10:25 +0000
16@@ -588,8 +588,6 @@
17
18 extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0018_NODES_NOT_IN_SAME_COLLECTION;
19
20-extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0019_UNDO_NOT_POSSIBLE;
21-
22 extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0020_INDEX_DOMAIN_NODE_NOT_IN_COLLECTION;
23
24 extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0021_INDEX_NOT_DECLARED;
25
26=== modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq'
27--- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-05-13 15:33:57 +0000
28+++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-05-16 00:10:25 +0000
29@@ -466,10 +466,6 @@
30
31 (:~
32 :)
33-declare variable $zerr:ZDDY0019 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0019");
34-
35-(:~
36-:)
37 declare variable $zerr:ZDDY0020 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0020");
38
39 (:~
40
41=== modified file 'src/diagnostics/diagnostic_en.xml'
42--- src/diagnostics/diagnostic_en.xml 2012-05-13 15:33:57 +0000
43+++ src/diagnostics/diagnostic_en.xml 2012-05-16 00:10:25 +0000
44@@ -2056,10 +2056,6 @@
45 <value>all nodes must be in same collection</value>
46 </diagnostic>
47
48- <diagnostic code="ZDDY0019" name="UNDO_NOT_POSSIBLE">
49- <value>"$1": collection $2 cannot be undone</value>
50- </diagnostic>
51-
52 <diagnostic code="ZDDY0020" name="INDEX_DOMAIN_NODE_NOT_IN_COLLECTION">
53 <value>"$1": index domain expression yields nodes that are not in collection</value>
54 </diagnostic>
55
56=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
57--- src/diagnostics/pregenerated/diagnostic_list.cpp 2012-05-13 15:33:57 +0000
58+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2012-05-16 00:10:25 +0000
59@@ -861,9 +861,6 @@
60 ZorbaErrorCode ZDDY0018_NODES_NOT_IN_SAME_COLLECTION( "ZDDY0018" );
61
62
63-ZorbaErrorCode ZDDY0019_UNDO_NOT_POSSIBLE( "ZDDY0019" );
64-
65-
66 ZorbaErrorCode ZDDY0020_INDEX_DOMAIN_NODE_NOT_IN_COLLECTION( "ZDDY0020" );
67
68
69
70=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
71--- src/diagnostics/pregenerated/dict_en.cpp 2012-05-13 15:33:57 +0000
72+++ src/diagnostics/pregenerated/dict_en.cpp 2012-05-16 00:10:25 +0000
73@@ -287,7 +287,6 @@
74 { "ZDDY0016", "\"$1\": multiple attemps to create a collection in the same snapshot" },
75 { "ZDDY0017", "node does not belong to any collection" },
76 { "ZDDY0018", "all nodes must be in same collection" },
77- { "ZDDY0019", "\"$1\": collection $2 cannot be undone" },
78 { "ZDDY0020", "\"$1\": index domain expression yields nodes that are not in collection" },
79 { "ZDDY0021", "\"$1\": undeclared index" },
80 { "ZDDY0022", "\"$1\": index already exists" },
81
82=== modified file 'src/store/naive/pul_primitives.cpp'
83--- src/store/naive/pul_primitives.cpp 2012-05-03 12:31:51 +0000
84+++ src/store/naive/pul_primitives.cpp 2012-05-16 00:10:25 +0000
85@@ -1283,19 +1283,11 @@
86 assert(lColl);
87
88 lColl->removeAll();
89- theIsApplied = true;
90-
91 }
92
93 void UpdTruncateCollection::undo()
94 {
95- if (!theIsApplied) return;
96-
97- throw ZORBA_EXCEPTION(
98- zerr::ZDDY0019_UNDO_NOT_POSSIBLE,
99- ERROR_PARAMS( theName->getStringValue(), "truncation" )
100- );
101-
102+ // NOOP
103 }
104
105
106
107=== modified file 'src/store/naive/simple_pul.cpp'
108--- src/store/naive/simple_pul.cpp 2012-05-03 12:31:51 +0000
109+++ src/store/naive/simple_pul.cpp 2012-05-16 00:10:25 +0000
110@@ -2288,6 +2288,14 @@
111 if (!theDeleteCollectionList.empty())
112 return;
113
114+ // if the collection is truncated, no other primitive needs to be applied
115+ if (!theTruncateCollectionList.empty())
116+ {
117+ applyList(theTruncateCollectionList);
118+ theIsApplied = true;
119+ return;
120+ }
121+
122 try
123 {
124 // Compute the before-delta for each incrementally maintained index.
125@@ -2379,7 +2387,6 @@
126 applyList(theCreateCollectionList);
127 applyList(theInsertIntoCollectionList);
128 applyList(theDeleteFromCollectionList);
129- applyList(theTruncateCollectionList);
130
131 // Compute the after-delta for each incrementally maintained index.
132 computeIndexAfterDeltas();

Subscribers

People subscribed via source and target branches