// truncate followed by write: VASResult shore_vas::updateObj( const lrid_t &obj, ObjectOffset offset, const vec_t &wdata, ObjectSize newlen, ObjectOffset newtstart ); // append followed by write: VASResult shore_vas::updateObj( const lrid_t &obj, ObjectOffset offset, const vec_t &wdata, ObjectOffset aoffset, const vec_t &adata, ObjectOffset newtstart );
In the first form, the argument newlen indicates the desired length of the object after the truncation occurs. If this is larger than the size of the object before truncation, the SVAS pads the object with zero-valued bytes up to the desired length.
In the second form, the size of the object is increased by appending the data given in adata. This form of requires the value aoffset to indicate the size of the object when the function is called. The reason for this is that the combined vectors adata and wdata may exceed internal limits on the size of a remote request. In that case, the append portion of this request is accomplished by a single append request with uninitialized data, along with a set of smaller write requests.
The vectors may be empty.
UpdateObj can change the location and size of the TEXT portion of the object. The argument newtstart indicates the new location of the beginning of the TEXT attribute.
An exclusive lock is acquired by updateObj.
Both forms of updateObj must be called when a transaction is active.
Deadlocks can occur while locks are being acquired. See transaction(svas) for information about deadlocks.
A complete list of errors is in errors(svas).