linq to sql concurrency issue! -
i have windows service deletes table rows. dont want delete rows , if rows loaded(to opertion) wcf service . seems should put locking mechanism , cant find on how . in regard ?
thanks jamal.
you shouldn't hold long term database locks. use kind of marking technique, such table of ids each loaded row foreign key original table. prevent deletions until wcf service deletes entries in auxiliary table. enable safe deletion appending where not exists (select * loaded_rows id = outer.id)
delete statements.
this model allows multiple "loaders", adding "loader_id" column auxiliary table.
the main problem suggested approach wcf service must delete rows when it's done them. if neglects due bug or crash, rows permanently locked (or @ least until dba wanders by). there numerous ways work around this, revolving around kind of expiry mechanism.
Comments
Post a Comment