Commit Graph

8048 Commits

Author SHA1 Message Date
AngrySoundTech
cb6e1efca9 Merge pull request #566 from MrJeremyFisher/remove-fixes
Remove outdated game fixes
2024-07-25 10:26:35 -04:00
Husky
6bff5ee960 move editorconfig 2024-07-19 21:29:30 -04:00
MrJeremyFisher
82eb2f25b4 Remove outdated game fixes 2024-07-15 23:11:17 -04:00
okx-code
2b16c0448d reduce chance 2024-07-15 20:17:30 +01:00
okx-code
1364e5e174 Merge pull request #560 from MrJeremyFisher/fix-cg-connecting
Fix Connectable Blocks Not Connecting on Undraw
2024-07-15 18:14:07 +01:00
MrJeremyFisher
851564002a remove extra line 2024-07-14 23:46:18 -04:00
MrJeremyFisher
5c8032736a Fix block neighbors not updating on undraw 2024-07-14 23:41:38 -04:00
Alexander
5d03515540 Add missing doors 2024-07-09 18:18:08 +01:00
MrJeremyFisher
0eed52b9d4 Format 2024-06-21 17:51:55 -04:00
MrJeremyFisher
d3cd4ea4e9 Standardize editorconfig 2024-06-21 17:49:37 -04:00
okx-code
d6083e73af remove from config too 2024-06-09 01:26:48 +01:00
okx-code
bb56a28a59 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
b0ad341d42 Merge pull request #538 from CivMC/snitchcrash
Fix some snitches crashing the server
2024-05-16 12:36:41 +02:00
RedDevel2
fe34d7f159 Merge pull request #488 from MrJeremyFisher/fmc-fix
Fix Command Created Factory IO
2024-05-16 12:10:22 +02:00
okx-code
bb949ac6cd 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
a4e8fad3ce again 2024-05-14 12:05:13 +02:00
RedDevel2
c941cd76f4 Bloody trees 2024-05-14 11:59:27 +02:00
RedDevel2
a884c068c8 Merge pull request #535 from CivMC/fixbeds
Revert "Discard entities before adding NPCs"
2024-05-14 09:46:01 +02:00
okx-code
f82f887974 Revert "Discard entities before adding NPCs"
This reverts commit 5d2151f1cd.
2024-05-14 02:18:41 +01:00
okx-code
9d2a09b568 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
AngrySoundTech
fd4952cab2 Add Castlegates to the monorepo 2024-05-12 18:16:49 -04:00
AngrySoundTech
e8f5ece8b4 Merge remote-tracking branch 'cg/master' into feature/missing-plugins 2024-05-12 18:09:05 -04:00
AngrySoundTech
8a1c11a62e Add Donum to monorepo 2024-05-12 17:49:39 -04:00
AngrySoundTech
59dd388ecb Merge remote-tracking branch 'd/master' 2024-05-12 17:31:25 -04:00
AngrySoundTech
5048283e41 Merge branch 'main' into feature/always-build-plugins 2024-05-12 12:41:56 -04:00
okx-code
954050054d update jukealert 2024-05-10 20:02:24 +01:00
okx-code
4fbe7f6c77 update namecolors and civchat and protocollib 2024-05-10 19:21:45 +01:00
okx-code
9cb24b1235 update kirabukkitgateway 2024-05-10 18:56:31 +01:00
AngrySoundTech
007dae84dd Create ansible gradle project to copy reobf artifacts into ansible for deployment 2024-05-09 18:07:02 -04:00
okx-code
b3f0438a94 Merge main 2024-05-09 00:52:02 +01:00
okx-code
b52671a0f0 Revert "Merge pull request #394 from MrJeremyFisher/maybe-fix-factory-overflow"
This reverts commit 6f1690f5aa, reversing
changes made to 314a69332d.
2024-05-09 00:46:29 +01:00
MrJeremyFisher
77d8b6bbca Fix command-created factory IO 2024-05-02 09:55:42 -04:00
RedDevel2
25550d45db Merge pull request #350 from MrJeremyFisher/nllim
Add `/nllim` (Name Layer List Invited Members)
2024-05-01 23:16:25 +02:00
RedDevel2
c172178111 Merge pull request #347 from MrJeremyFisher/pot-glitch-fix
Don't heal dead entities with health potions
2024-05-01 23:16:17 +02:00
RedDevel2
fbc55520c7 Merge pull request #383 from drekamor/main
Proper /nldg confirmation
2024-05-01 23:15:55 +02:00
RedDevel2
01cb3304de Merge pull request #386 from CivMC/fix-portals
Fix portal hack not triggering
2024-05-01 23:15:28 +02:00
RedDevel2
358031b27a Merge pull request #391 from CivMC/fix-chunk-meta
Fix chunk meta not saving
2024-05-01 23:15:18 +02:00
RedDevel2
6d6d05fbbd Merge pull request #404 from Protonull/ignorelist-command
Refactor /ignorelist command
2024-05-01 23:15:09 +02:00
RedDevel2
6f1690f5aa Merge pull request #394 from MrJeremyFisher/maybe-fix-factory-overflow
Fix Factory Overflow
2024-05-01 23:15:01 +02:00
okx-code
86756a8ebf Update AntiDerailment NMS 2024-04-23 20:48:12 +01:00
okx-code
711f374b46 Update FakePlayer 2024-04-23 20:46:29 +01:00
okx-code
13b1ff19fa Merge branch 'main' into mc/1.20
# Conflicts:
#	plugins/citadel-paper/src/main/java/vg/civcraft/mc/citadel/listener/BlockListener.java
#	plugins/simpleadminhacks-paper/src/main/java/com/programmerdan/minecraft/simpleadminhacks/hacks/SaplingHack.java
2024-04-23 20:31:08 +01:00
drekamor
61d43b4ac9 Merge branch 'CivMC:main' into main 2024-04-17 17:44:24 +01:00
Alexander
53c46e9bfc Refactor /ignorelist command 2024-04-16 06:54:46 +01:00
Alexander
22fe282298 Yeet canvas 2024-04-05 00:06:57 +01:00
MrJeremyFisher
dc53ec8da9 Requested changes 2024-04-01 15:17:54 -04:00
MrJeremyFisher
2bbdda5ba5 Fix incorrect fullness checks 2024-04-01 14:55:10 -04:00
okx-code
156597b8e0 Fix chunk meta 2024-03-26 15:38:14 +00:00
okx-code
36ba51fea8 ertyeghzsehyen edgz 2024-03-26 01:35:57 +00:00
okx-code
e98f28bb2f bump versions 2024-03-25 21:31:45 +00:00