Project

General

Profile

Feature #2231

LockType error processing

Added by Ovidiu Maxiniuc over 10 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vadim Nebogatov
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
version:

vmn_upd20140331a.zip (29.6 KB) Vadim Nebogatov, 03/31/2014 12:06 PM

History

#1 Updated by Ovidiu Maxiniuc over 10 years ago

With the emergence of the new dynamic features in P2J some of the parameters of the methods/attributes cannot be checked at conversion time.
This is the case of LockType.fromLockNowait() that will be called from multiple places, each of those expecting different error messages in Progress.
There are two directions:
  • let the fromLockNowait aware of the calling location by adding an additional parameter (string or int)
  • fromLockNowait throws an exception and handling the error case will be done by the caller.

#2 Updated by Greg Shah about 10 years ago

  • Project changed from Base Language to Database

#3 Updated by Eric Faulhaber about 10 years ago

  • Assignee set to Vadim Nebogatov

#4 Updated by Vadim Nebogatov about 10 years ago

I have selected the second option suggested in note 1.

FIND- and GET- methods tested with wrong lock and nowait values. LockType changes: it will throw special LockTypeException extends Exception in such cases. This exception is processed in all LockType.fromLockNowait usages.

This exception will be internal to the persistence framework and will not be exposed to converted code.

#5 Updated by Vadim Nebogatov about 10 years ago

Attached update vmn_upd20140331a.zip.

Passed cases:

h:FIND-BY-ROWID(rr, 11, NO-WAIT).
FIND-BY-ROWID, FIND-FIRST etc., second argument must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK. (7344) 
h:FIND-BY-ROWID(rr, 11, 12).
FIND method argument must be NO-WAIT, or 0 or ?. (7343) 
h:FIND-BY-ROWID(rr, NO-LOCK, 87).
FIND method argument must be NO-WAIT, or 0 or ?. (7343) 
h:FIND-FIRST("where", NO-LOCK, 87).
FIND method argument must be NO-WAIT, or 0 or ?. (7343) 
h:FIND-FIRST("where", 11, 87).
FIND method argument must be NO-WAIT, or 0 or ?. (7343) 
h:FIND-FIRST("where", 23, 6090).
FIND-BY-ROWID, FIND-FIRST etc., second argument must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK. (7344) 
h:FIND-LAST("where", 23, 6090).
FIND-BY-ROWID, FIND-FIRST etc., second argument must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK. (7344) 
h:FIND-LAST("where", 11, 87).
FIND method argument must be NO-WAIT, or 0 or ?. (7343) 
h:FIND-UNIQUE("where", 23, 6090).
FIND-BY-ROWID, FIND-FIRST etc., second argument must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK. (7344) 
h:FIND-UNIQUE("where", 11, 87).
FIND method argument must be NO-WAIT, or 0 or ?. (7343) 
h:FIND-UNIQUE("where",11, NO-WAIT).
FIND-BY-ROWID, FIND-FIRST etc., second argument must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK. (7344) 
QUERY hQuery:GET-FIRST(11, 6090).
The first argument to QUERY GET methods must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK (7314)
QUERY hQuery:GET-FIRST(11, 90).
QUERY GET second argument must be NO-WAIT or 0. (7360)
QUERY hQuery:GET-FIRST(6209, 33).
QUERY GET second argument must be NO-WAIT or 0. (7360)
QUERY hQuery:GET-LAST(11, 90).
QUERY GET second argument must be NO-WAIT or 0. (7360)
QUERY hQuery:GET-CURRENT(11, 90).
QUERY GET second argument must be NO-WAIT or 0. (7360)
QUERY hQuery:GET-CURRENT(11, 0).
The first argument to QUERY GET methods must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK (7314)
QUERY hQuery:GET-PREV(11, 0).
The first argument to QUERY GET methods must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK (7314)
QUERY hQuery:GET-NEXT(11, 0).
The first argument to QUERY GET methods must be NO-LOCK, SHARE-LOCK or EXCLUSIVE-LOCK (7314)

Test cases look like:

1)

def temp-table tt field i as int.
create tt.
def var h as handle.
create query h.
h:add-buffer(buffer tt:handle).
h:query-prepare("for each tt") no-error.
h:QUERY-OPEN().
h:GET-PREV(11, 0).

2)

def temp-table tt field i as int.
create tt.
def var h as handle.
create buffer h for table "tt".
def var rr as rowid.
rr = ROWID(tt).
h:FIND-FIRST("where", NO-LOCK, 87).

#6 Updated by Eric Faulhaber about 10 years ago

The update looks good. Please regression test.

#7 Updated by Vadim Nebogatov about 10 years ago

Regression 20140401_172003 completed with 4 FAILED tests:

1. tc_job_002 FAILED failure in step 40: 'Unexpected EOF in actual at page # 1.'

2. gso_190 FAILED failure in step 27: 'timeout before the specific screen buffer became available (Mismatched data at line 21, column 0. Expected '' (0x0000 at relative Y 21, relative X 0) and found 'R' (0x0052 at relative Y 21, relative X 0).)'

3. tc_dc_slot_027 FAILED failure in step 20: 'timeout before the specific screen buffer became available (Mismatched data at line 4, column 0. Expected '' (0x0000 at relative Y 4, relative X 0) and found 'L' (0x004C at relative Y 4, relative X 0).)'

4. tc_dc_slot_029 FAILED failure in step 20: 'timeout before the specific screen buffer became available (Mismatched data at line 4, column 0. Expected '' (0x0000 at relative Y 4, relative X 0) and found 'L' (0x004C at relative Y 4, relative X 0).)'

Regression started one more time.

#8 Updated by Vadim Nebogatov about 10 years ago

Second regression 20140402_084955 is completed with 2 FAILED tests:

1. tc_job_002 FAILED failure in step 40: failure in step 40: 'Unexpected EOF in actual at page # 1.'

2. tc_job_clock_002 FAILED failure in step 20: 'timeout before the specific screen buffer became available (Mismatched data at line 5, column 18. Expected '' (0x0000 at relative Y 5, relative X 18) and found '┌' (0x250C at relative Y 5, relative X 18).)'

So, it seems regression passed.

#9 Updated by Eric Faulhaber about 10 years ago

Yes, please commit and distribute the update.

#10 Updated by Vadim Nebogatov about 10 years ago

Committed to bzr rev. 10503.

#11 Updated by Eric Faulhaber about 10 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

#12 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 11 to Cleanup and Stablization for Server Features

Also available in: Atom PDF