Skip to content

Commit 330ed38

Browse files
committed
Merge branch 'ps/reftable-stack-tempfile'
The code in reftable backend that creates new table files works better with the tempfile framework to avoid leaving cruft after a failure. * ps/reftable-stack-tempfile: reftable/stack: register compacted tables as tempfiles reftable/stack: register lockfiles during compaction reftable/stack: register new tables as tempfiles lockfile: report when rollback fails
2 parents 7a01b44 + 60c4c42 commit 330ed38

File tree

5 files changed

+178
-183
lines changed

5 files changed

+178
-183
lines changed

lockfile.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ static inline int commit_lock_file_to(struct lock_file *lk, const char *path)
321321
* Roll back `lk`: close the file descriptor and/or file pointer and
322322
* remove the lockfile. It is a NOOP to call `rollback_lock_file()`
323323
* for a `lock_file` object that has already been committed or rolled
324-
* back.
324+
* back. No error will be returned in this case.
325325
*/
326-
static inline void rollback_lock_file(struct lock_file *lk)
326+
static inline int rollback_lock_file(struct lock_file *lk)
327327
{
328-
delete_tempfile(&lk->tempfile);
328+
return delete_tempfile(&lk->tempfile);
329329
}
330330

331331
#endif /* LOCKFILE_H */

0 commit comments

Comments
 (0)