Context:
node.module defines the constant "NODE_NEW_LIMIT" (line 45):

/**
 * Nodes changed before this time are always marked as read.
 *
 * Nodes changed after this time may be marked new, updated, or read, depending
 * on their state for the current user. Defaults to 30 days ago.
 */
define('NODE_NEW_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60);

(See https://api.drupal.org/api/drupal/modules!node!node.module/constant/NODE...)

Problem:
The value should not be a constant, because it may depend on the website configuration to define the given limit.
For high performance pages for example a much lower value might be the right decision.
For edge cases a much higher value might be the right decision.

There are other issues describing the problem with the hard limit:
#766670: The {history} table in Drupal doesn't scale at all
#401328: _forum_topics_unread: SQL performance problem can kill the database

Proposed solution:
Set the limit as system variable to make it changeable and exportable.

Comments

anybody’s picture

Issue summary: View changes
moymilo’s picture

StatusFileSize
new2.13 KB

Add node new limit setting to system_performance_settings form.

moymilo’s picture

Status: Active » Needs review
dcam’s picture

Title: Make constant NODE_NEW_LIMIT changeable » Make constant HISTORY_READ_LIMIT changeable
Version: 7.x-dev » 8.0.x-dev
Category: Task » Feature request
Status: Needs review » Active

It looks like this constant was moved into the history module for D8 and is now called HISTORY_READ_LIMIT, but the value is still the same. The change will have to be made there first.

yogen.prasad’s picture

Assigned: Unassigned » yogen.prasad
yogen.prasad’s picture

@dcam , currently there is not any configuration settings form for history module,

should we need to create one?

moymilo’s picture

Assigned: yogen.prasad » moymilo
Status: Active » Needs review
StatusFileSize
new3.78 KB

Rework patch for the the Drupal 8.

Status: Needs review » Needs work

The last submitted patch, 7: drupal_core_make_constant-2355527-7.patch, failed testing.

moymilo’s picture

StatusFileSize
new3.89 KB
moymilo’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 9: drupal_core_make_constant-2355527-9.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

anybody’s picture

Issue tags: +Needs backport to D7
moymilo’s picture

Patch #2 for D7, is it fits like backport to D7?

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vladbo’s picture

Status: Needs work » Closed (duplicate)
anybody’s picture

Version: 8.6.x-dev » 7.x-dev
Status: Closed (duplicate) » Needs review
Parent issue: » #2006632: Make HISTORY_READ_LIMIT configurable

Then let's use this separate issue for Drupal 7, see Patch #2.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.