Specify read-only database access¶
saf_setProps_ReadOnly
is a function defined in dbprops.c.
Synopsis:
-
int
saf_setProps_ReadOnly
(SAF_DbProps *properties)¶
Formal Arguments:
properties
: The database property list which will be modified by this function (See *Properties*).
Description: By default a database is opened for read/write access. This function changes the access property so the database is opened for read-only access.
Opening for read-only when the client is, in fact, only reading the database can potentially have a dramatic impact on parallel performance. The reason is that the lower level data modeling kernel, VBT, can duplicate the metadata tables on all processors and wholly eliminate all MPI communication involved in interacting with the database. At present, VBT does not actually do this but will, in the future, be modified to do so.
Preconditions:
properties
must not be null. (high-cost)
Return Value: The constant SAF__SUCCESS
is returned when this function is successful. Otherwise this function either returns
an error number or throws an exception, depending on the value of the library’s error handling property.
Parallel Notes: This function can be called independently.
See Also:
- Database Properties: Introduction for current chapter