Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: SevHist record overwrite

SevHist record overwrite 9 years 11 months ago #6353

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
Hi

I set up a SevHist object connected to a 5 minute thread (300s) then I noticed in the object graph something strange: certain moments when the value should be stored in the database are being skipped.

I think for some reason a row/record is being overwritten. I went to the underlying project mysql database and checked it, as you can see in the attached file the topmost row id 55469 has been rewritten or overwritten. And I think the same happened to the other rows whose time column are not 5 minutes from each other.

What do you think?

Eduardo
Attachments:
Last Edit: 9 years 11 months ago by beloni.
The administrator has disabled public write access.

SevHist record overwrite 9 years 11 months ago #6354

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
Hi Eduardo,

I guess you are running myisam, I would try innodb instead. See 'sev_repair -h" on how to change engine.

/Claes
The administrator has disabled public write access.

SevHist record overwrite 9 years 11 months ago #6355

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
Hi Claes,

I've set sevMysqlEngine innodb in /etc/proview.cnf but sev_repair -e is using the wrong path and project name:
$ sev_repair -e
In ../../sev_dbms.cpp row 575:
** Cannot open file: /pwrp/common/db/pwrp__testoper.db/connection.dmsql, No such file or directory
** Error: Database environment doesn't exist

When it should be /usr/local/pwrp/brasserie35/src/db/pwrp__brasserie35.db/connection.dmsql
Where can I change the project name?

Thank you

Eduardo
Last Edit: 9 years 11 months ago by beloni.
The administrator has disabled public write access.

SevHist record overwrite 9 years 11 months ago #6356

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
On a development station you first have to attach the project with

> sdf 'projectname'

You can also change the engine from mysql with 'alter table 'tablename' engine=innodb'.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: beloni

SevHist record overwrite 9 years 11 months ago #6358

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
Unfortunately the problem persists despite change of engine:
mysql> select * from O000_001_001_006_0000041b__1;
| 55477 | 2014-04-28 11:29:22 | 259121242 |     0 |    0 |
| 55478 | 2014-04-28 11:34:22 | 392456468 |     3 |    1 |
| 55479 | 2014-04-28 11:39:22 | 492612356 |     3 |    1 |
+-------+---------------------+-----------+-------+------+
26 rows in set (0.00 sec)

mysql> select * from O000_001_001_006_0000041b__1;
| 55477 | 2014-04-28 11:29:22 | 259121242 |     0 |    0 |
| 55478 | 2014-04-28 11:34:22 | 392456468 |     3 |    1 |
| 55479 | 2014-04-28 11:44:22 | 659959486 |     3 |    1 |
+-------+---------------------+-----------+-------+------+
26 rows in set (0.00 sec)
mysql> show table status where name = 'O000_001_001_006_0000041b__1';
+------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| Name                         | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation         | Checksum | Create_options | Comment |
+------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
| O000_001_001_006_0000041b__1 | InnoDB |      10 | Compact    |   27 |            606 |       16384 |               0 |        16384 |   4194304 |          55481 | 2014-04-28 11:18:17 | NULL        | NULL       | latin1_swedish_ci |     NULL |                |         |
+------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+
1 row in set (0.05 sec)
The administrator has disabled public write access.

SevHist record overwrite 9 years 10 months ago #6387

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
I've noticed in sev_dbms.cpp sev_dbms::store_values() that a time update might happen if pwr_mSevOptionsMask_UseDeadBand is present and update_time_only happen to be set.

I tried disabling option UseDeadBand but I still got time being updated...
Last Edit: 9 years 10 months ago by beloni.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.526 seconds