Opened 12 years ago

Closed 12 years ago

#73 closed defect (fixed)

rasdaman error 202: Exception: Index violation on 3D collections

Reported by: barboni@… Owned by: Dimitar Misev
Priority: critical Milestone:
Component: insertutils Version: 8.2
Keywords: Cc: Peter Baumann, beccati@…
Complexity: Medium

Description

bug derived by a discussion on rasdaman-users mailing list at
http://groups.google.com/group/rasdaman-users/browse_thread/thread/bc36ed6e58cad3ba?hl=en

The following two query reproduce the error on a collection initialized as shown later on:
rasql -q 'update aatsr as m set m[5, 100:355, 100:310] assign inv_tiff($1)' -f mr_1.tif
rasql -q "update aatsr as m set m[5, 100:355, 100:310] assign shift(inv_tiff(\$1),[100, 100])" -f mr_1.tif

where aatsr is a 3D collection defined as atsrSet on the following types:
typedef marray <char, [*:*, *:*, 0:*]> atsr;
typedef set<atsr> atsrSet

initialised with: rasql -q "insert into aatsr values marray x in[0:0,0:0,0:0] values 0c"

the image used on this test (mr_1.tif) is the single band tif image included on the rasdaman package at:
"/rasdaman/manuals_and_examples/examples/images"

the problem is for me critical since it limits the possibility of updating a 3D collection

Damiano

Attachments (1)

8C8C8C.tif (10.1 KB ) - added by barboni@… 12 years ago.
single band tiff used for tests

Download all attachments as: .zip

Change History (8)

comment:1 by Dimitar Misev, 12 years ago

Owner: changed from Peter Baumann to Dimitar Misev
Status: newassigned

comment:2 by Dimitar Misev, 12 years ago

Cc: Peter Baumann added
Resolution: fixed
Status: assignedclosed

The index that is used by default doesn't seem to allow this kind of overlapping updates.

When you initialize the MDD, try with specifically setting the index to rc_index:

rasql -q "insert into aatsr values marray x in[0:0,0:0,0:0] values 0c index rc_index"

You may want to look at this paper for more details.

comment:3 by Dimitar Misev, 12 years ago

Cc: beccati@… added
Resolution: fixed
Status: closedreopened

That unfortunately doesn't work, error spotted by Alan Beccati:

Trying to add index rc_index when inserting into collection generates the following error:

rasql: rasdaman query tool v1.0, rasdaman v8 — generated on 23.11.2011 14:34:26.
opening database RASBASE at localhost:7001...ok
Executing update query…rasdaman error 225: (no explanation text available for this error code.)
aborting transaction…ok
rasql done.

comment:4 by barboni@…, 12 years ago

I noticed that the updates made ​​using marray instead tif work properly if I insert 3d marray.
If I try to insert a 2d marray in a 3d collection i reproduce the same error.

example:
#create and init collection
create collection testbug GreySet3insert into testbug values marray x in [0:10,0:10,0] values 0c
insert into testbug values marray x in [0:10,0:10,0] values 0c

#error inserting tiff
rasql -q 'update testbug as m set m[0:100, 0:100, 0] assign inv_tiff($1)' —file 8C8C8C.tif —user rasadmin —passwd rasadmin
Executing update query…rasdaman error 202: Exception: Index violation ( index range [$low,$high], index $index ).
#error inserting 2d marray
rasql -q 'update testbug as m set m[0:100, 0:100, 0] assign marray x in [0:100,0:100] values 100c'
Executing update query…rasdaman error 202: Exception: Index violation ( index range [$low,$high], index $index ).

#all the following updates with 3d marray work propertly
update testbug as m set m assign marray x in [0:20,0:20,0] values 100c
update testbug as m set m assign marray x in [0:100,0:100,0] values 10c
update testbug as m set m assign marray x in [50:200,90:150,0] values 55c

Hope this help

Ciao

Damiano

by barboni@…, 12 years ago

Attachment: 8C8C8C.tif added

single band tiff used for tests

comment:5 by beccati@…, 12 years ago

I think also the index violation message may refer to the a subscript index of a GMarray and not an indexing scheme

Alan

comment:6 by Dimitar Misev, 12 years ago

This has worked ok:

rasql -q "create collection test GreySet3" --user rasadmin --passwd rasadmin
rasql -q "insert into test values marray x in[0:0,0:0,0:0] values 0c" --user rasadmin --passwd rasadmin

rasql -q 'update test as m set m[5, 0:*,0:*] assign inv_tiff($1)' -f mr_1.tif --user rasadmin --passwd rasadmin
rasql -q 'update test as m set m[5, 256:*,211:*] assign shift(inv_tiff($1),[256,211])' -f mr_1.tif --user rasadmin --passwd rasadmin

The index violation error appears only if the second update overlaps the previous, this is the bug that should be fixed.

in reply to:  6 comment:7 by Dimitar Misev, 12 years ago

Resolution: fixed
Status: reopenedclosed

Replying to dmisev:

The index violation error appears only if the second update overlaps the previous, this is the bug that should be fixed.

Submitted patches that fix this and related ticket #123

Note: See TracTickets for help on using tickets.