Problem/Motivation

Found a 5.x issue where a pager was added to the revisions list, it's regressed since but not sure where.

Now get out of memory or max_execution_time if an entity has a lot of revisions.

Core has the same problem looks like the diff form copied some of that code, see #2746033: NodeController::revisionOverview() does not have a pager, which results in unlimited queries.

Proposed resolution

Add a pager.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

catch created an issue. See original summary.

rfay’s picture

Version: 8.x-1.0-alpha2 » 8.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.93 KB
catch’s picture

Not sure I'd bother making it configurable, views can (or should if it needs a bit more integration for diff) do that. Otherwise looks good though.

rfay’s picture

StatusFileSize
new3.25 KB

This patch adds the revision_pager_limit type to the schema. Thanks @damian.

@catch, since views bulk stuff is not currently revisions-aware, it seems like it might be a while before this is easy to do with a view, so with that concern, I'm inclined to leave the config in there. Thanks so much for the review.

rfay’s picture

Status: Needs review » Needs work

Revisions are currently in reverse order :(

rfay’s picture

Status: Needs work » Needs review
StatusFileSize
new3.39 KB

OK, now the revisions are in the correct order and the config gets properly set on a system where diff was already installed.

rfay’s picture

StatusFileSize
new3.33 KB

- Remove the inline code to add default config
- Change to diff_update_8001() which is the logical choice

miro_dietiker’s picture

I first opened an issue about the HEAD fails... #2757469: HEAD is broken

The last submitted patch, 2: diff.add_revisions_pager.2746069_02.patch, failed testing.

The last submitted patch, 4: diff.add_revisions_pager.2746069_04.patch, failed testing.

The last submitted patch, 6: diff.add_revisions_pager.2746069_06.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 7: diff.add_revisions_pager.2746069_07.patch, failed testing.

The last submitted patch, 7: diff.add_revisions_pager.2746069_07.patch, failed testing.

miro_dietiker’s picture

Title: No pager on revisions listing » Needs tests: No pager on revisions listing
Issue tags: +Needs tests

I was about to commit this after fixing HEAD, but there is some fail. Also we also want to have a minimalistic test coverage for diff.

The last submitted patch, 7: diff.add_revisions_pager.2746069_07.patch, failed testing.

johnchque’s picture

Assigned: Unassigned » johnchque

Let's add tests for this. :)

The last submitted patch, 7: diff.add_revisions_pager.2746069_07.patch, failed testing.

johnchque’s picture

Status: Needs work » Needs review
StatusFileSize
new3.33 KB
new4.63 KB

Added tests, fixed current ones. :)

johnchque’s picture

Made some changes to avoid creating 50 revisions with no reason. :)

miro_dietiker’s picture

Status: Needs review » Fixed
Issue tags: -Needs tests

Thx, committing. :-)

Status: Fixed » Closed (fixed)

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