Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent!

 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • 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 ]
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • 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.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic