mirror of https://github.com/citusdata/citus.git
Fix a compiler warning that we get on debian (#5260)
parent
74d9d2a718
commit
32e3e51ed4
|
@ -830,51 +830,38 @@ CheckStripeMetadataConsistency(StripeMetadata *stripeMetadata)
|
||||||
(stripeMetadata->fileOffset == ColumnarInvalidLogicalOffset &&
|
(stripeMetadata->fileOffset == ColumnarInvalidLogicalOffset &&
|
||||||
stripeMetadata->dataLength == 0));
|
stripeMetadata->dataLength == 0));
|
||||||
|
|
||||||
switch (StripeWriteState(stripeMetadata))
|
StripeWriteStateEnum stripeWriteState = StripeWriteState(stripeMetadata);
|
||||||
{
|
if (stripeWriteState == STRIPE_WRITE_FLUSHED && stripeLooksFlushed)
|
||||||
case STRIPE_WRITE_FLUSHED:
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If stripe was flushed to disk, then we expect stripe to store
|
* If stripe was flushed to disk, then we expect stripe to store
|
||||||
* at least one tuple.
|
* at least one tuple.
|
||||||
*/
|
*/
|
||||||
if (stripeLooksFlushed)
|
return;
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
else if (stripeWriteState == STRIPE_WRITE_IN_PROGRESS && stripeLooksInProgress)
|
||||||
|
|
||||||
case STRIPE_WRITE_IN_PROGRESS:
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If stripe was not flushed to disk, then values of given four
|
* If stripe was not flushed to disk, then values of given four
|
||||||
* fields should match the columns inserted by
|
* fields should match the columns inserted by
|
||||||
* InsertEmptyStripeMetadataRow.
|
* InsertEmptyStripeMetadataRow.
|
||||||
*/
|
*/
|
||||||
if (stripeLooksInProgress)
|
return;
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
else if (stripeWriteState == STRIPE_WRITE_ABORTED && (stripeLooksInProgress ||
|
||||||
|
stripeLooksFlushed))
|
||||||
case STRIPE_WRITE_ABORTED:
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Stripe metadata entry for an aborted write can be complete or
|
* Stripe metadata entry for an aborted write can be complete or
|
||||||
* incomplete. We might have aborted the transaction before or after
|
* incomplete. We might have aborted the transaction before or after
|
||||||
* inserting into stripe metadata.
|
* inserting into stripe metadata.
|
||||||
*/
|
*/
|
||||||
if (stripeLooksInProgress || stripeLooksFlushed)
|
return;
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
|
||||||
ereport(ERROR, (errmsg("unexpected stripe state, stripe metadata "
|
ereport(ERROR, (errmsg("unexpected stripe state, stripe metadata "
|
||||||
"entry for stripe with id=" UINT64_FORMAT
|
"entry for stripe with id=" UINT64_FORMAT
|
||||||
" is not consistent", stripeMetadata->id)));
|
" is not consistent", stripeMetadata->id)));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue