Ticket #137 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Better handling of updated items

Reported by: mbonetti Owned by: sdcosta
Priority: high Milestone: Gregarius 0.6.0
Component: BUGS Version:
Severity: normal Keywords: db
Cc: mdodoo

Description

As of now Gregarius checks for updates by comparing the length of the "description" field in the feed agains the stored length. This is far from optimal.

Olivier suggests we compute an MD5 hash for each description and store it in the database.

He sent me the patch below.

Personally I'm happy with how it's done right now, but we shall track this issue in this ticket.

Attachments

md5_test.patch (3.3 kB) - added by mbonetti 3 years ago.
Modifies the schema to store an md5 hash of each item's description

Change History

Changed 3 years ago by mbonetti

Modifies the schema to store an md5 hash of each item's description

Changed 3 years ago by mdodoo

I like the use of md5 to check if the description has changed, but I am not sure that it needs to be stored in the database. Are there compelling reasons against Gregarius generating md5 hashes of the 'old' description on-the-fly?

Changed 3 years ago by mdodoo

Also, the current "update" check looks like it will not be tripped if the new description is shorter than the existing one.

Changed 3 years ago by oruffin

First reason to store MD5 in DB is performance: no need to recalculate each time the MD5 of the DB stored description. Also we can imagine that some plugin in the future change the content of the description before storing it (or is it already like that today?) and if so, it would mean that if we don't store MD5 of the "raw" text, then each time we would have to apply all plugins to new text and then build an MD5 to see if it's match or not... Would be really really not nice;)

Changed 3 years ago by mdodoo

  • cc mdodoo added

Changed 3 years ago by sdcosta

  • owner changed from mbonetti to sdcosta
  • status changed from new to assigned

Changed 3 years ago by sdcosta

  • priority changed from low to high

Changed 3 years ago by sdcosta

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in [1155]

Note: See TracTickets for help on using tickets.