New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage format for serialized data #619

Closed
borekb opened this Issue Jan 11, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@borekb
Copy link
Member

borekb commented Jan 11, 2016

Currently, we store serialized data as they are, i.e., serialized. For example, this is how we store the active_plugins option:

[active_plugins]
option_value = "a:1:{i:0;s:29:\"versionpress/versionpress.php\";}"
autoload = "yes"

This was simple to implement but degrades the data inside serialized arrays / objects to something that cannot easily be ignored (#607), diffed, will cause merge conflicts, etc. WordPress, and especially some plugins, heavily use serialized data so we really need to support this better.

One initial idea is to convert the serialized data into some INI subset that would be hierarchical and friendly to diffing. For example, the above could be stored as something like:

[active_plugins]
option_value = <<serialized>>
option_value.0 = versionpress/versionpress.php
autoload = "yes"

If the first index contained an object with properties a and b, the keys would be something like:

option_value.0.a = ...
option_value.0.b = ...

Etc. This is pseudocode, I haven't put much thought into the format yet.

@borekb borekb added this to the 4.0 milestone Jan 11, 2016

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Mar 9, 2016

Moving this to 3.0 where it feels more at home. Let's see if it can make it to the release as it's quite late in the release cycle.. but I have no doubts @JanVoracek :)

@borekb borekb modified the milestones: 4.0, 3.0 Mar 9, 2016

@JanVoracek JanVoracek self-assigned this Mar 11, 2016

JanVoracek added a commit that referenced this issue Mar 21, 2016

JanVoracek added a commit that referenced this issue Mar 21, 2016

[#619] Added support for serialized references and pointers. Reworked…
… saving serialized data to just string operations.

JanVoracek added a commit that referenced this issue Mar 21, 2016

JanVoracek added a commit that referenced this issue Mar 22, 2016

JanVoracek added a commit that referenced this issue Mar 22, 2016

JanVoracek added a commit that referenced this issue Mar 22, 2016

@JanVoracek JanVoracek referenced this issue Mar 22, 2016

Merged

Storage format for serialized data #806

2 of 2 tasks complete

@JanVoracek JanVoracek added in review and removed in progress labels Mar 23, 2016

JanVoracek added a commit that referenced this issue Mar 24, 2016

JanVoracek added a commit that referenced this issue Mar 24, 2016

JanVoracek added a commit that referenced this issue Mar 24, 2016

[#619] Keywords 'reference' and 'pointer' changed to '*reference*' an…
…d '*pointer*' because of possible conflicts with class names
@JanVoracek

This comment has been minimized.

Copy link
Member

JanVoracek commented Mar 30, 2016

Reopening. DB rows containing string false are missing after re-saving entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment