• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Urgent!

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After I uploaded the assignment, I found a problem:
I don't program the lock mechanism for the readRecord and createRecord. I only programed for updateRecord and deleteRecord. I used the lock mechanism as lockRecord/process/unlock.
Is this error?
[ March 25, 2004: Message edited by: long lingyu ]
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Long

Originally posted by long lingyu:
After I uploaded the assignment, I found a problem:
I don't program the lock mechanism for the readRecord and createRecord. I only programed for updateRecord and deleteRecord. I used the lock mechanism as lockRecord/process/unlock.
Is this error?


Actually for reading and creating, there is no need for locking I think. But you should have documented this concern in the choices and let know grader that there might be a chance of other thread updating/booking/or even deleting the record while one thread is reading.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi long,
In fact, readRecord does not require any lock, as it is a share lock. However, of course, you need to make sure that the record does not be updated when it is being read. Otherwise, the record will be changed. In DB world, they call this: "unrepeatable read".
For createRecord, there is no RECORD LOCK, however, you need to have a DB file lock, otherwise, multiple writes will corrupt the file. In DB world, they call this: "lost update".
Since you have uploaded the assignment, I dont think you can have a chance to reupload it, as SUN's said upload can only be performed once. If you need another upload, you need to pay US 125.
Anyway, dont worried. This is just minor stuffs, since you wont provide any APIs for the client to invoke the create method.
Nick
 
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic