We have this situation where we had to change the delta of a block on an already deployed application. The update was done on several places on the database.

We noticed that on these blocks, when trying to save the block settings, block_cachealter crashes:

SQLSTATE[23000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'blockcache_alter_pkey'. Cannot insert duplicate key in object 'dbo.blockcache_alter'. The duplicate key value is (684).

This is because in blockcache_alter_save_settings() the module is fetching the blockcache_alter block information using the block's module and delta, but later it uses the block id to match registries in the block and blockcache_alter tables.

There are two possiblities here:

- Consistently uses module + delta to identify a block
- Consistently use the block id

CommentFileSizeAuthor
#1 2510130-save-use-id.patch506 bytesdavid_garcia

Comments

david_garcia’s picture

Status: Active » Needs review
StatusFileSize
new506 bytes
vensires’s picture

Status: Needs review » Reviewed & tested by the community

The patch saved the day.

  • Fabianx committed a83aedc on 7.x-1.x authored by david_garcia
    Issue #2510130 by david_garcia, vensires: Uncaught exception when a...
fabianx’s picture

Status: Reviewed & tested by the community » Fixed

Thank you, committed and pushed to 7.x-1.x!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.