In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Relationship Graph View Issue ] Dependency Graph ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0000052 [In-Portal CMS] Data Management bug report random 2009-06-07 07:42 2009-10-03 07:56
Reporter alex View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed      
Summary 0000052: Preventing Data loss from Temporarily tables
Description We could lost data, when 2 concurrently running processes tries to copy data from same temporary table to live table. To prevent this I propose to implement semaphore system. Idea is to put all processes, that required temp->live operation to queue using database lock feature.
Additional Information Implementing logic:
Add new Semaphores table, that will consist of Timestamp, SessionKey and MainPrefix columns. Before temp to live coping starts open second database connection and lock Semaphores table (new table). Then we should search for any record for our prefix. When found we release lock, wait for 1 second and repeat previous steps. In case, when we totally have waited for 30 seconds, then exit from coping process with error.

If at some point we haven't found record with our prefix, then we should add one and release lock. Perform coping from temp to live. Lock Semaphores table and delete our previously added record and release lock.

This way if two (or more) temp handlers will meet, then they will wait for each other and won't start to work concurrently.



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker