EP1566751A1

Optimising lock granularity using range locking

Abstract

Invention relates to concurency control in a DBMS. The escalation method with primary key range locking is provided. An heuristic method is used to define key range.

EP1566751A1, drawing sheet 1
Sheet 1 of 4

Term

Term ended

Projected expiry passed 31 January 2025, 1.6 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

5 claims: 3 independent, 2 dependent

  1. 1
    A method for locking data objects in a computer system (101), the method comprising a lock service module (113, 205) receiving from a first processing module (114, 201) a request to lock one or more (n) data objects for access for further data processing modules (115) by creating one or more lock objects (116, 206) for the one or more data objects, said method further comprising:- the lock service (113, 205) receiving names (205) of one or more (m) key fields of the one or more data objects to be locked;- the lock service (113, 205) receiving n values (203) for each of the m key fields of n data objects to locked;- the lock service (113, 205) receiving a maximum number (k) (204) of locks to lock the n data objects;- the lock service checking whether n =k and in case yes,    creating one or more lock objects (116, 206) comprising the m names and n values for the m key fields in case no,    querying the n values of the m key fields and determining numbers (y1 to ym) of different values (Val_1.1 to Val_m.ym) of the key fields 1 to m;- the lock service (113, 205) determining consecutively from a first to i-th field where i =m until y1*...*yi = k and in case the condition is satisfied, - creating one or more lock objects (116, 206) comprising the names of the key fields 1 to m and values Val_1.1 to Val_(i-1).y(i-1) for the key fields 1 to i-1 and comprising wildcards for the remaining key fields.
  2. 3
    A computer system (101) comprising a lock mechanism for locking data objects, the lock mechanism comprising a lock service module (113) capable of receiving a lock request from a first processing module (114) to lock one or more (n) data objects for access for further data processing modules (115) by creating one or more lock objects (116) for the one or more data objects, comprising:- memory (108) having program instructions;- input means (109, 103) for receiving and entering data;- output means (109, 104) for sending and presenting data - storage means (107) for storing data;- a processor (105) responsive to the program instructions;- said program instructions comprising program code means for performing a method according to any of claims 1 to 2 when the program instructions are loaded into the memory and executed by the processor.
  3. 4
    A computer readable medium comprising program instructions for locking data objects in a computer system, the program instructions comprising instructions for:performing a method according to any of claims 1 or 2 when the program instructions are executed in the computer system.