Skip to content
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

WIP: BUGFIX: Enable WorkspaceRuntimeCache and ContentSubgraphWithRuntimeCaches after disabling #4955

Draft
wants to merge 1 commit into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Mar 19, 2024

@kitsunet and me stumbled upon that we only ever disable the workspace runtime cache but never reenable it.
For the subgraph cache, we enable it also again on reset:

But it seems reenabling on reset is too simple. Reset will not actually be executed in a normal live cycle.
Maybe we can just flush the cache instead of disable and it is still hot?

Upgrade instructions

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

@@ -138,6 +138,7 @@ public function reset(): void
$this->getDatabaseConnection()->exec('TRUNCATE ' . $this->tableName);
$this->checkpointStorage->acquireLock();
$this->checkpointStorage->updateAndReleaseLock(SequenceNumber::none());
$this->workspaceRuntimeCache->enableCache();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the other hand this will not really be called in production.

The same is with the ContentSubgraphWithRuntimeCaches. it seems we never reenable the cache if marked once as stale (during event handling)

@mhsdesign mhsdesign changed the title BUGFIX: Enable WorkspaceRuntimeCache after disabling BUGFIX: Enable WorkspaceRuntimeCache and ContentSubgraphWithRuntimeCaches after disabling Mar 19, 2024
@mhsdesign mhsdesign marked this pull request as draft March 19, 2024 09:17
@mhsdesign mhsdesign changed the title BUGFIX: Enable WorkspaceRuntimeCache and ContentSubgraphWithRuntimeCaches after disabling WIP: BUGFIX: Enable WorkspaceRuntimeCache and ContentSubgraphWithRuntimeCaches after disabling Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant