Save errors


#1

i am trying save operator with different params and it seems to fail under parallel save.
i have scidb single node with 2 instances running locally.

AFL% save(current_speed,’/tmp/current_speed.csv’,-1,‘opaque’);
UserException in file: src/smgr/io/ArrayWriter.cpp function: save line: 1263
Error id: scidb::SCIDB_SE_ARRAY_WRITER::SCIDB_LE_CANT_LOCK_FILE
Error description: Error while saving array. Failed to get exclusive access to the file /tmp/current_speed.csv, error = 11.
AFL% save(current_speed,’/tmp/current_speed.csv’,-1,‘opaque’);
UserException in file: src/smgr/io/ArrayWriter.cpp function: save line: 1263
Error id: scidb::SCIDB_SE_ARRAY_WRITER::SCIDB_LE_CANT_LOCK_FILE
Error description: Error while saving array. Failed to get exclusive access to the file /tmp/current_speed.csv, error = 11.
AFL% save(current_speed,’/tmp/current_speed.csv’,0,‘opaque’);
UserException in file: src/smgr/io/ArrayWriter.cpp function: save line: 1263
Error id: scidb::SCIDB_SE_ARRAY_WRITER::SCIDB_LE_CANT_LOCK_FILE
Error description: Error while saving array. Failed to get exclusive access to the file /tmp/current_speed.csv, error = 11.
AFL% save(current_speed,’/tmp/current_speed.csv’,0,‘opaque’);
Query was executed successfully


#2

is there a reason parallel save does not work? Did i miss something?
documentation paradigm4.com/HTMLmanual/14.3/scidb_ug/re61.html does not mention anything about special considerations needed for parallel save

save(current_speed,’/tmp/current_speed.csv’,-1,‘opaque’);
UserException in file: src/smgr/io/ArrayWriter.cpp function: save line: 1263
Error id: scidb::SCIDB_SE_ARRAY_WRITER::SCIDB_LE_CANT_LOCK_FILE
Error description: Error while saving array. Failed to get exclusive access to the file /tmp/current_speed.csv, error = 11.


#3

You need to specify a relative path, not absolute.

save(current_speed,‘current_speed.csv’,-1,‘opaque’);

Then there will be a file “current_speed.csv” in each instance’s data directory (as per the config.ini file). Your problem happens because many instances are trying to write to the same location and are trampling each other.