Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve Content Versioning#25437

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Nitwel wants to merge12 commits intomain
base:main
Choose a base branch
Loading
fromcontent-versioning-fix
Draft

Improve Content Versioning#25437

Nitwel wants to merge12 commits intomainfromcontent-versioning-fix

Conversation

Nitwel
Copy link
Member

@NitwelNitwel commentedJul 11, 2025
edited
Loading

Scope

What's changed:

  • Rethink the way delta is merged on a versioned request by relying on transactions instead of manually trying to merge the delta.

Potential Risks / Drawbacks

  • As the request will be a single big transaction, this could impact performance as the DB might create a lot of locks for this transaction.
  • The sequence counters for primary keys will be increased by each request as that doesn't get reset by the transaction rollback.

Review Notes / Questions

  • None so far

Testing

  • While a version request is active, the api can still respond to normal read requests. (Even with con-pool of 1)
  • Version requests are only sequential when they're against the same id. Or items inside the delta. (Basically DB locking works as expected)
  • I was not able to reproduce any deadlocks in the DB due to the sequential handling of versioned requests
  • Confirmed that SQLite locks everything until the transaction is resolved.

Load testing

Against items endpoint with o2m, m2o, m2m and m2a relations, 100vus total for 1 minute. Version delta includes create, update and delete for each relation. With version means that 5% of requests where with a version attached the rest being normal read requests and no version meaning 100% of requests where without a version.

No Caching (mariadb):with version: avg=934.05ms min=31.15ms med=1.03s max=1.8s p(90)=1.34s p(95)=1.45sno version:   avg=810.92ms min=30.57ms med=924.6ms max=1.63s p(90)=1s p(95)=1.14sWith Caching (mariadb):with version: avg=41.99ms min=2.65ms med=8.43ms max=1.89s p(90)=14.75ms p(95)=33.3msno version:   avg=42.43ms min=0s     med=7.96ms max=1.88s p(90)=13.17ms p(95)=40.48msNo Caching (sqlite):with version: avg=1.27s min=15.52ms med=1.51s max=2.08s p(90)=1.73s p(95)=1.83sno version:   avg=1.27s min=15.22ms med=1.42s max=2.08s p(90)=1.5s p(95)=1.59sNo Caching (postgres):with version: avg=1.54s min=42.46ms med=1.83s max=2.74s p(90)=1.93s p(95)=2.04sno version:   avg=1.21s min=40.51ms med=1.37s max=2.08s p(90)=1.42s p(95)=1.54s

Fixes#24740
Fixes CMS-1084

burka and joselcvarela reacted with heart emoji
@linearLinear
Copy link

linearbot commentedJul 11, 2025

@changeset-botchangeset-bot
Copy link

changeset-botbot commentedJul 11, 2025
edited
Loading

⚠️ No Changeset found

Latest commit:698fd1e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go.If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@NitwelNitwel changed the titleImprove Content VersionImprove Content VersioningJul 11, 2025
@coderabbitaicoderabbitai
Copy link
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the.coderabbit.yaml file in this repository. To trigger a single review, invoke the@coderabbitai review command.

You can disable this status message by setting thereviews.review_status tofalse in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat withCodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag@coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag@coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on oursupport page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings togenerate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add@coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add@coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add@coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a.coderabbit.yaml file to the root of your repository.
  • Please see theconfiguration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit ourDocumentation for detailed information on how to use CodeRabbit.
  • Join ourDiscord Community to get help, request features, and share feedback.
  • Follow us onX/Twitter for updates and announcements.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Using version and deep sort in readItem does not sort anymore until version is main
1 participant
@Nitwel

[8]ページ先頭

©2009-2025 Movatter.jp