Skip to content

Conversation

@Anthony4m
Copy link
Owner

No description provided.

Corrected the way the buffer manager policy is called
in `logmgr.go`.  The change ensures the correct method
is used to allocate buffers for log blocks.
Refactor transaction manager to improve code style and
add functionality.  Added error handling and improved
concurrency control.  Added FindCell and InsertCell
functions.
Improve the transaction manager and buffer list by
refactoring the Pin, UnPin, and Buffer functions.  Add
error handling and improve the overall design for
better efficiency and clarity.  Also, simplify the
FindCell and InsertCell functions in transactionMgr.go.
Renamed `GetFileName` method to `FileName` for
better readability and consistency.  Updated all
references to the renamed method.

(transaction)
Add a method to access the internal buffer of the
LogMgr struct.  This allows external access to
the buffer for inspection or manipulation.
Refactor concurrency management to use a more robust
and thread-safe implementation.  Move the
`ConcurrencyMgr` to the `concurrency` package. Add
shared and exclusive locking mechanisms with error
handling and a release method.  Implement two-phase
locking protocol.
Refactor lock table to use time.Second for timeout and
improve error messages.  Add unlock functionality and
GetLockInfo helper method.  Change package name from
transaction to concurrency.
This commit implements a new log record type,
`UnifiedUpdateRecord`, for handling unified updates
in the logging system.  It includes serialization and
deserialization methods, as well as an `Undo` method
for transaction rollback.  The `CreateLogRecord`
function is updated to handle this new record type.  The
old `log_record.go` file has been removed and replaced
with a new, improved version.
Corrected the method used to retrieve the block
filename in LogIterator.  The `GetFileName` method
was replaced with `FileName` for accuracy.
This commit implements a recovery manager that handles
logging, commit, rollback, and recovery operations for
transactions.  The `recoveryMgr.go` file in the
`recovery` package now contains the implementation.  The
previous `recoveryMgr.go` file in the `transaction`
package has been removed.  The recovery manager uses
unified log records to efficiently handle undo and redo
operations.
This commit refactors the transaction management and
logging system.  The `LogRecord` interface is
enhanced to include new operation types. The
`TransactionMgr` is updated to use the new
`recovery` and `concurrency` packages, improving
concurrency control and recovery mechanisms.  The
`ITransaction` interface is moved to a new
`transaction_interface` package.  Error handling
is improved throughout the codebase.
@Anthony4m Anthony4m merged commit bfb8672 into master Feb 10, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants