Final answer:
A transaction ends in the committed state, where recovery protocols record changes permanently, typically through a system log to ensure durability and consistency.
Step-by-step explanation:
When a transaction ends, it moves to the committed state. At this point, recovery protocols must ensure that even in the case of a system failure, the changes made by the transaction can be recorded permanently. One common method for achieving this is by writing the changes to a system log, which then can be used to recover the transaction changes if necessary. This process is also known as writing the commit record to the log. It is crucial in maintaining the consistency and durability properties of a transaction within a database system.