[Tickets #13876] Re: horde_histories_modseq reset to 1 by code

noreply at bugs.horde.org noreply at bugs.horde.org
Fri Mar 6 09:25:44 UTC 2015


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/13876
------------------------------------------------------------------------------
  Ticket             | 13876
  Updated By         | horde at albasoft.com
  Summary            | horde_histories_modseq reset to 1 by code
  Queue              | Synchronization
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


horde at albasoft.com (2015-03-06 09:25) wrote:

I had a new history_modseq reset in the same database just some days  
ago. My current modseq should be right now over 550000, but it shows  
just about 6000.
I'm almost sure that it is some sort of "race condition" when server  
load is too high, as I explained before.

I'm trying the following patch, to prevent "horde_histories_modseq"  
table to become empty.
It really doesn't change anything, as I guess code executes deletes in  
"horde_histories_modseq" table because old data there is useless.

--- a/Horde/History/Sql.php	2015-03-06 10:10:49.075159565 +0100
+++ b/Horde/History/Sql.php	2015-03-06 10:11:20.547151406 +0100
@@ -355,7 +355,7 @@
      {
          try {
              $result = $this->_db->insert('INSERT INTO  
horde_histories_modseq (history_modseqempty) VALUES(0)');
-            $this->_db->delete('DELETE FROM horde_histories_modseq  
WHERE history_modseq <> ?', array($result));
+            $this->_db->delete('DELETE FROM horde_histories_modseq  
WHERE history_modseq < (? - 25)', array($result));
          } catch (Horde_Db_Exception $e) {
              throw new Horde_History_Exception($e);
          }







More information about the bugs mailing list