Commit Graph

10629 Commits

Author SHA1 Message Date
okx-code
46f8d279cd Merge pull request #560 from MrJeremyFisher/fix-cg-connecting
Fix Connectable Blocks Not Connecting on Undraw
2024-07-15 18:14:07 +01:00
okx-code
4803e0e952 Merge pull request #557 from Protonull/citadel-update
Add missing doors
2024-07-15 18:13:12 +01:00
MrJeremyFisher
1e0ce59772 remove extra line 2024-07-14 23:46:18 -04:00
MrJeremyFisher
94634da5b5 Fix block neighbors not updating on undraw 2024-07-14 23:41:38 -04:00
okx-code
44b8ce5887 Merge pull request #558 from CivMC/trims1
remove duplication
2024-07-14 16:22:47 +01:00
okx-code
3a14f6c7ed remove duplication 2024-07-14 16:11:49 +01:00
Alexander
f43fcb9ff6 Add missing doors 2024-07-09 18:18:08 +01:00
okx-code
4948f9e3e1 Merge pull request #554 from CivMC/fix-workflow
Fix workflow
2024-06-26 02:26:45 +01:00
okx-code
576cd7b9d6 Revert "Update comment_on_pr.yaml"
This reverts commit f52d63dd3e.
2024-06-26 02:26:20 +01:00
okx-code
f40ca25bd8 Revert "fix workflow"
This reverts commit 2edea33a2d.
2024-06-26 02:25:43 +01:00
okx-code
b68640fe4d Merge pull request #553 from CivMC/fix-workflow
fix workflow
2024-06-26 02:20:55 +01:00
okx-code
2edea33a2d fix workflow 2024-06-26 02:20:40 +01:00
okx-code
d5c092c681 Merge pull request #549 from MrJeremyFisher/fix-pr-action
Fix Delete Comment On PR Error
2024-06-26 02:02:33 +01:00
okx-code
abc136fec6 Merge pull request #551 from MrJeremyFisher/autoformat
Autoformat
2024-06-26 01:57:08 +01:00
MrJeremyFisher
84be937c31 Add .git-blame-ignore-revs 2024-06-21 18:01:47 -04:00
MrJeremyFisher
cbaf56cbb3 Format 2024-06-21 17:51:55 -04:00
MrJeremyFisher
32a270c7a7 Standardize editorconfig 2024-06-21 17:49:37 -04:00
Jeremy Favro
f52d63dd3e Update comment_on_pr.yaml 2024-06-20 17:35:18 -04:00
okx-code
6bc1705f3c Merge pull request #546 from CivMC/removefixpearlglitch
Cleanup config
2024-06-09 01:27:11 +01:00
okx-code
00b767f7fa remove from config too 2024-06-09 01:26:48 +01:00
okx-code
0635a587f7 Merge pull request #545 from CivMC/removefixpearlglitch
Remove pearl glitch fix
2024-06-09 01:25:59 +01:00
okx-code
2510355600 Remove pearl glitch fix
This is a remnant of pre-2017 civ, and has been fixed by Mojang in recent versions
2024-06-09 00:56:53 +01:00
RedDevel2
33f7173796 Merge pull request #538 from CivMC/snitchcrash
Fix some snitches crashing the server
2024-05-16 12:36:41 +02:00
RedDevel2
3be54519e6 Merge pull request #488 from MrJeremyFisher/fmc-fix
Fix Command Created Factory IO
2024-05-16 12:10:22 +02:00
okx-code
558f661833 Fix some snitches crashing the server
The problem with snitches crashing the server is that the MariaDB query planner decides that it is going to be smart, and actually do a query from the (very small) ja_snitch_actions table, and then join the (humongous) ja_snitch_entries table.

To do this, it has the genius idea of filtering the ja_snitch_entries table by the type_id column. This column represents the type of snitch entry, be it entering the snitch, breaking a block, placing a block, etc. Naturally, MariaDB thinks that it can reduce the 10M+ row database to just 1000 rows with this filter. But it turns out that there are LOTS of entries for each type_id, so it actually get about 600K columns, and has to linearly search through them.

Only a handful of snitches have been found to crash the server this way. I don't know how the MariaDB query planner works, nor do I want to, but I can speculate that only very heavily trafficked snitches would crash the server in this way, or perhaps those that show an unusual distribution of entry types.

Here is the MariaDB ANALYZE output for when the query planner thinks it's really smart:

```
+------+-------------+-------+-------+-----------------------------+---------+---------+------------------+------+-----------+----------+------------+-------------+
| id   | select_type | table | type  | possible_keys               | key     | key_len | ref              | rows | r_rows    | filtered | r_filtered | Extra       |
+------+-------------+-------+-------+-----------------------------+---------+---------+------------------+------+-----------+----------+------------+-------------+
|    1 | SIMPLE      | jsa   | range | PRIMARY                     | PRIMARY | 4       | NULL             | 17   | 1.00      |   100.00 |     100.00 | Using where |
|    1 | SIMPLE      | jse   | ref   | type_id,snitch_action_index | type_id | 5       | jukealert.jsa.id | 1241 | 671443.00 |     0.51 |       0.00 | Using where |
+------+-------------+-------+-------+-----------------------------+---------+---------+------------------+------+-----------+----------+------------+-------------+
```

As you can see, the query planner thinks it will get 1241 rows, but it actually gets 600K. Big miscalculation.

In contrast, here is a normal snitch:

```
| id   | select_type | table | type   | possible_keys               | key                 | key_len | ref                   | rows  | r_rows | filtered | r_filtered | Extra       |
+------+-------------+-------+--------+-----------------------------+---------------------+---------+-----------------------+-------+--------+----------+------------+-------------+
|    1 | SIMPLE      | jse   | ref    | type_id,snitch_action_index | snitch_action_index | 5       | const                 | 54054 | 10.00  |    50.00 |     100.00 | Using where |
|    1 | SIMPLE      | jsa   | eq_ref | PRIMARY                     | PRIMARY             | 4       | jukealert.jse.type_id | 1     | 1.00   |   100.00 |     100.00 |             |
+------+-------------+-------+--------+-----------------------------+---------------------+---------+-----------------------+-------+--------+----------+------------+-------------+
```

Interesting, the query planner drastically over-estimates the amount of rows it will scan. It thinks it will need to comb through 50K logs, but it actually ends up looking through 11.

Perhaps an alternative solution could be trying to update the data analysis the query planner gets - it may be severely inaccurate. However, this fix should be sufficient as STRAIGHT_JOIN forces the join to be done in a specific order (big table joins small table), instead of the wrong order (small table joins big table), which is ALWAYS wrong.

Database query planner bugs are just the best aren't they?
2024-05-14 23:27:32 +01:00
RedDevel2
9adcebab99 Merge pull request #537 from CivMC/testrb
Actually map the trees to the saplings.
2024-05-14 12:25:02 +02:00
RedDevel2
5a26e97b6b Restore growth times 2024-05-14 12:23:00 +02:00
RedDevel2
0093b6bece Need to check my work better smh 2024-05-14 12:21:37 +02:00
RedDevel2
8afe7ccb77 again 2024-05-14 12:05:13 +02:00
RedDevel2
0dc796d2be Bloody trees 2024-05-14 11:59:27 +02:00
RedDevel2
8dce417735 - 2024-05-14 11:37:48 +02:00
RedDevel2
9118607767 Merge pull request #528 from CivMC/Movejar
Move jar to correct folder
2024-05-14 10:52:07 +02:00
RedDevel2
5eed3a5f53 Merge pull request #535 from CivMC/fixbeds
Revert "Discard entities before adding NPCs"
2024-05-14 09:46:01 +02:00
RedDevel2
a97b81e91b Merge pull request #531 from CivMC/fixportals
Fix pearled players going through portals
2024-05-14 09:42:53 +02:00
okx-code
90c9e2f464 Revert "Discard entities before adding NPCs"
This reverts commit 5d2151f1cd.
2024-05-14 02:18:41 +01:00
okx-code
a8114481d0 Fix pearled players going through portals
That was being based on PlayerPortalEvent, which is no longer being called. The fix is to manually call the event.
2024-05-13 23:09:56 +01:00
RedDevel2
9b11393c1a Merge pull request #489 from MrJeremyFisher/patch-1
Superfriend snitch fix
2024-05-13 15:21:48 +02:00
RedDevel2
8a45ad00a6 Move jar to correct folder 2024-05-13 15:12:51 +02:00
RedDevel2
de19474450 Merge pull request #526 from CivMC/Emotes
Fix Emotes
2024-05-13 10:08:42 +02:00
RedDevel2
dae82be236 Merge pull request #511 from CivMC/RedDevel2-patch-1
Fix Mangrove/cherry saplings
2024-05-13 01:49:06 +02:00
RedDevel2
9ef6865fe4 Merge pull request #525 from CivMC/main
Update branch
2024-05-13 01:15:24 +02:00
AngrySoundTech
6ed936669f Merge pull request #524 from CivMC/feature/missing-plugins
Add CastleGates and Donum
2024-05-12 19:10:48 -04:00
RedDevel2
afabd337d0 Update test variable 2024-05-13 01:08:47 +02:00
AngrySoundTech
3b203b12c5 Add Castlegates to the monorepo 2024-05-12 18:16:49 -04:00
AngrySoundTech
6d785413f4 Merge remote-tracking branch 'cg/master' into feature/missing-plugins 2024-05-12 18:09:05 -04:00
AngrySoundTech
d7f6690a6a Add Donum to monorepo 2024-05-12 17:49:39 -04:00
AngrySoundTech
d6af0c8e1d Merge remote-tracking branch 'd/master' 2024-05-12 17:31:25 -04:00
AngrySoundTech
0fbf8100a6 Merge pull request #497 from CivMC/feature/always-build-plugins
Build plugins from source for ansible deployments
2024-05-12 14:04:18 -04:00
AngrySoundTech
9cbcd2649e Remove civdocker version 2024-05-12 13:20:31 -04:00
AngrySoundTech
23e28e188e Fix gradle action name 2024-05-12 13:18:06 -04:00