4.4 The Log Manager
 
 
   
   
         
 Next: 5 Implementation
Up: 4 Log Manager Interface
 Previous: 4.3 Shared Memory Structure
 
 
 
The log manager is defined in  class log.  Every  Minirel
process will instantiate a global object of this class.   Class
log includes methods to
-  Read a log record given its LSN.
	
 -  Read the log record that immediately follows the log
record with the supplied LSN.
	
 -  Read the log record that immediately follows the
supplied log record.
	
 -  Append a log record to the end of the log.
	
 -  Flush the log tail to disk.  Anyone who wants the log
tail flushed (except the buffer manager) will call  log::flush.
The buffer manager [Qiu & Su 95] will call  log::bufmgr_flush.
When  log::flush is invoked, it will flush the log tail and
inform the buffer manager of the last LSN that made it to disk.  The
buffer manager can use this information to enforce WAL efficiently.
If the buffer manager wishes the log tail to be flushed, it calls 
log::bufmgr_flush which will flush the log tail and return the last
LSN that made it.
	
 -  Return the LSN that will be assigned to the next log
record written.
	
 -  Read/write access to the master log record.
 
 Class log is also used to create and initialize new log files.
 
ajitk@cs.wisc.edu, cjin@cs.wisc.edu