[tarantool-patches] Re: [PATCH] replication: force gc to clean xdir on ENOSPC err

Georgy Kirichenko georgy at tarantool.org
Thu Jun 7 07:24:47 MSK 2018


On Wednesday, June 6, 2018 12:27:52 PM MSK Konstantin Belyavskiy wrote:
> Garbage collector do not delete xlog unless replica do not notify
> master with newer vclock. This can lead to running out of disk
> space error and this is not right behaviour since it will stop the
> master.
> 

> @@ -180,8 +180,13 @@ process_rw(struct request *request, struct space
> *space, struct tuple **result) * when WAL is written in autocommit mode.
>  	 */
>  	TupleRefNil ref(tuple);
> -	if (txn_commit_stmt(txn, request) != 0)
> +	if (txn_commit_stmt(txn, request) != 0) {
1. Here you will mark as dead as many replicas as many in-flight commiting 
requests you have.
2. I think you should send some message from wal thread to advance gc. In that 
case you will be able to use fallocate without any tx thread changes.
> +		struct error *e = diag_last_error(diag_get());
> +		if (e != NULL && e->type == &type_ClientError &&
> +		    box_error_code(e) == ER_NO_DISK_SPACE)
> +			gc_leftmost_mark_dead();
>  		return -1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180607/5280313b/attachment.sig>


More information about the Tarantool-patches mailing list