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

Anurag Shekhar commented on DERBY-3330:
---------------------------------------

Thanks Mike for pointing out issues related to locking and also about the way 
I have handled deleted row.

I went through the code you have have asked me to look for reference and also 
the doIns code. This is what I think I should be doing.

Step 1. Find the slot where new row can be inserted.
Step 2. Get the left row (without checking for deleted row) if there is a match 
try to 
hold a lock. If lock is obtained without releasing the latch no other 
transaction is 
working on it and it should be a deleted row. return error if its not. 
If latch was released tree has under gone some changes and start with step 1.

Step3. Repeat step 2 for right row.

I am checking out B2IRowLocking3.searchLeftAndLockPreviousKey and will be
 posting about locking scheme and effect of isolation level shortly.

> provide support for unique constraint over nullable columns
> -----------------------------------------------------------
>
>                 Key: DERBY-3330
>                 URL: https://issues.apache.org/jira/browse/DERBY-3330
>             Project: Derby
>          Issue Type: New Feature
>          Components: Store
>    Affects Versions: 10.4.0.0
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>         Attachments: derby-3330-testcase.diff, derby-3330.diff, 
> derby-3330v2.diff, derby-3330v3.diff, derby-3330v4.diff, 
> FunctionalSpec_DERBY-3330-V2.html, FunctionalSpec_DERBY-3330.html
>
>
> Allow unique constraint over nullable field. Right now derby support unique 
> constraint only over not null columns.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to