Definition in file sm_base.h.
Go to the source code of this file.
Defines | |
#define | SM_EXTENTSIZE 8 |
#define | SM_LOG_PARTITIONS 8 |
Typedefs | |
typedef w_rc_t | rc_t |
typedef w_rc_t(*) | LOG_WARN_CALLBACK_FUNC (xct_i *iter, xct_t *&victim, fileoff_t curr, fileoff_t thresh, const char *logfile) |
Log space warning callback function type. | |
typedef w_base_t::uint4_t | partition_number_t |
Callback function type for restoring an archived log file. | |
typedef w_rc_t(*) | LOG_ARCHIVED_CALLBACK_FUNC (const char *fname, partition_number_t num) |
Enumerations | |
enum | cmp_t |
Comparison types used in scan_index_i
Shorthand for CompareOp. | |
enum | escalation_options |
enum | store_t { , t_index, t_file, t_lgrec } |
Types of stores. More... | |
enum | ndx_t |
Index types. | |
enum | concurrency_t |
Lock granularities. More... | |
enum | pg_policy_t |
File-compaction policy for creating records. More... |
typedef w_rc_t(*) LOG_WARN_CALLBACK_FUNC(xct_i *iter, xct_t *&victim, fileoff_t curr, fileoff_t thresh, const char *logfile) |
Log space warning callback function type.
For more details of how this is used, see the constructor ss_m::ss_m().
Storage manager methods check the available log space. If the log is in danger of filling to the point that it will be impossible to abort a transaction, a callback is made to the server. The callback function is of this type. The danger point is a threshold determined by the option sm_log_warn.
The callback function is meant to choose a victim xct and tell if the xct should be aborted by returning RC(eUSERABORT).
Any other RC value is returned to the server through the call stack.
The arguments:
[in] | iter | Pointer to an iterator over all xcts. |
[out] | victim | Victim will be returned here. This is an in/out paramter and is initially populated with the transaction that is attached to the running thread. |
[in] | curr | Bytes of log consumed by active transactions. |
[in] | thresh | Threshhold just exceeded. |
[in] | logfile | Character string name of oldest file to archive. |
When this function has archived the given log file, it needs to notify the storage manager of that fact by calling ss_m::log_file_was_archived(logfile)
typedef w_base_t::uint4_t partition_number_t |
Callback function type for restoring an archived log file.
[in] | fname | Original file name (with path). |
[in] | needed | Partition number of the file needed. |
Archiving and removing the older log files will work only if the server also provides a LOG_ARCHIVED_CALLBACK_FUNCTION to restore the archived log files when the storage manager needs them for rollback. This is the function type used for that purpose.
The function must locate the archived log file containing for the partition number num, which was a suffix of the original log file's name. The log file must be restored with its original name.
enum store_t |
enum concurrency_t |
Lock granularities.
enum pg_policy_t |
File-compaction policy for creating records.
These are masks - the following combinations are sensible: