When an attachment of real estate is made in any action and the complaint is not filed in court, or when any attachment of real estate is dissolved by lapse of time or failure to levy upon the judgment debt within the time prescribed by law to preserve said attachment and the said attachment then remains undischarged upon the records of the registry of deeds, the plaintiff upon the demand of the defendant shall either cause the said attachment to be discharged upon the records of the registry of deeds or give a certificate, signed, sealed and acknowledged by him that said attachment is discharged, when said certificate is prepared and presented to the plaintiff by the defendant, which said certificate the register of deeds shall record with reference thereto on the margin of the record of said attachment.
14 M.R.S. § 4604