Simple forum software for building great communities.
Go to file
Alexander Skvortsov b17f26e6a8 feat: calculate post numbers via subquery
On heavily volatile communities running on distributed systems, if two replies are posted at approximately the same time, each node will try to use the same post number, which results in a failed integrity constraint.

Potential options for fixing this were discussed in https://github.com/flarum/framework/issues/3350. We settled on calculating the post number via subquery during post instance creation, which should solve this issue since DB transactions are atomic.

To facilicate this, we needed to implement support for DB attributes that are calculated via subquery at insert, but otherwise stored and accessed normally. This PR adds a `InsertViaSubqueryTrait` which adds exactly this feature.
2022-03-23 15:29:55 -04:00
.github fix: Assorted Typing Fixes (#3348) 2022-03-23 11:43:14 -04:00
extensions Bundled output for commit a595665bfb 2022-03-23 15:45:44 +00:00
framework/core feat: calculate post numbers via subquery 2022-03-23 15:29:55 -04:00
js-packages fix: Assorted Typing Fixes (#3348) 2022-03-23 11:43:14 -04:00
node_modules fix: Assorted Typing Fixes (#3348) 2022-03-23 11:43:14 -04:00
php-packages fix: Assorted Typing Fixes (#3348) 2022-03-23 11:43:14 -04:00
.gitattributes fix: Assorted Typing Fixes (#3348) 2022-03-23 11:43:14 -04:00
.gitignore feat: use yarn workspaces 2022-03-11 19:12:11 -05:00
.styleci.yml chore: flarum-cli audit infra --fix 2022-03-11 18:02:51 -05:00
flarum-monorepo.json chore: add monorepo config file 2022-03-11 18:01:44 -05:00
package.json feat: use yarn workspaces 2022-03-11 19:12:11 -05:00
README.md chore: move core's README to framework root. 2022-03-11 18:08:11 -05:00
yarn.lock fix: Assorted Typing Fixes (#3348) 2022-03-23 11:43:14 -04:00

PHP Tests Total Downloads Latest Version License huntr StyleCI

About Flarum

Flarum is a delightfully simple discussion platform for your website. It's fast and easy to use, with all the features you need to run a successful community. It is designed to be:

  • Fast and simple. No clutter, no bloat, no complex dependencies. Flarum is built with PHP so its quick and easy to deploy. The interface is powered by Mithril, a performant JavaScript framework with a tiny footprint.

  • Beautiful and responsive. This is forum software for humans. Flarum is carefully designed to be consistent and intuitive across platforms, out-of-the-box.

  • Powerful and extensible. Customize, extend, and integrate Flarum to suit your community. Flarums architecture is amazingly flexible, with a powerful Extension API.

Screenshot of a Flarum instance, showing multiple discussions and tags.

Installation

This repository contains Flarum's core code. If you want to set up a forum, visit the Flarum skeleton repository. For support, refer to the documentation, and ask questions on Flarum Discuss (our community forum) or Discord server.

Contributing

Thank you for considering contributing to Flarum! Please read the Contributing guide to learn how you can help.

Security Vulnerabilities

If you discover a security vulnerability within Flarum, please send an e-mail to security@flarum.org. All security vulnerabilities will be promptly addressed. More details can be found in our security policy.

License

Flarum is open-source software licensed under the MIT License.