db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-4923) update of a long row can fail with ERROR nospc: nospc.U exception.
Date Thu, 24 Oct 2013 15:18:02 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804306#comment-13804306
] 

ASF subversion and git services commented on DERBY-4923:
--------------------------------------------------------

Commit 1535408 from mikem@apache.org in branch 'code/branches/10.8'
[ https://svn.apache.org/r1535408 ]

DERBY-6320 Log a page dump to derby.log if ERROR nospc: nospc.U is returned to the user

backported change #1535206 from 10.10 to 10.8 branch, merge was clean.

This patch adds the ability to dump a page in an insane build, and adds 2 calls
to do so in 2 outstanding nospc error cases. In those two cases a new user
level error is thrown and nests the nospc.U error so that we still know the
original stack trace where the lowest error was thrown.
The patch passes all tests and the specific errors were hand tested, one of
them using the test case filed in DERBY-4923 and in the other case just by hand
forcing the codepath.

> update of a long row can fail with ERROR nospc: nospc.U exception.
> ------------------------------------------------------------------
>
>                 Key: DERBY-4923
>                 URL: https://issues.apache.org/jira/browse/DERBY-4923
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.10.1.1, 10.11.0.0
>            Reporter: Mike Matrigali
>            Assignee: Mike Matrigali
>              Labels: derby_triage10_11
>         Attachments: DERBY-4923.diff, DERBY_4923.java, derby4923repro.diff, derby-4923-tt-aa-NoSpaceOnPageExtendsException.diff,
derby.log
>
>
> An update of a row fails with a nospc.U exception.  If there is space on the disk then
an update should never fail for a space 
> issue.  The code is meant to always reserve enough space on a page such that if an expanding
update happens that does not
> fit, it should in the worst case change the row to an overflow row pointer and put the
rest in a linked overflow chain.
> The following set of circumstances will cause this bug (not sure which are exactly needed
- just what i did to
> cause the repro), I will be attaching a test case:
> The row being updated has the following characteristics:
>     o located on 4k page
>     o 2 colum row with 2nd column a blob column
>     o the row is a long row with first piece having 1st column on main page, and the
2nd piece having just blob column on overflow page.
>     o before the update there is 0 free space on the overflow page.
>     o the update causes the blob column to expand past 4k 
> Caused by: java.sql.SQLException: nospc.U
>     at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
>     at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
>     at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
>     ... 39 more
> Caused by: ERROR nospc: nospc.U
>     at org.apache.derby.impl.store.raw.data.StoredPage.logRow(StoredPage.java:4155)
>     at org.apache.derby.impl.store.raw.data.UpdateOperation.writeOptionalDataToBuffer(UpdateOperation.java:255)
>     at org.apache.derby.impl.store.raw.data.UpdateOperation.<init>(UpdateOperation.java:106)
>     at org.apache.derby.impl.store.raw.data.LoggableActions.actionUpdate(LoggableActions.java:80)
>     at org.apache.derby.impl.store.raw.data.StoredPage.doUpdateAtSlot(StoredPage.java:8625)
>     at org.apache.derby.impl.store.raw.data.BasePage.updateAtSlot(BasePage.java:1062)
>     at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.replace(GenericConglomerateController.java:486)
>     at org.apache.derby.impl.sql.execute.RowChangerImpl.updateRow(RowChangerImpl.java:523)
>     at org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(UpdateResultSet.java:569)
>     at org.apache.derby.impl.sql.execute.UpdateResultSet.open(UpdateResultSet.java:264)
>     at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:436)
>     at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:317)
>     at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1241)
>     ... 33 more



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message