1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix various player save issues (performance penalty on sql backends + bugs)

* PostgreSQL & SQLite3 doesn't setModified(false) on RemotePlayer, then player is saved on each server save call. This results in heavy useless writes.
* PostgreSQL & SQLite3 ack engine meta write whereas db commit hasn't been performed. If commit failed write has failed. We mustn't notify engine write is done.
* serializing player meta must not setModified(false) because it didn't ensure write has been done
* add RemotePlayer::on_successfull_save callback to do the flag update on a successful save
This commit is contained in:
Loïc Blot 2019-01-04 10:20:04 +01:00
parent 0717719073
commit c1d7dbfc38
5 changed files with 15 additions and 5 deletions

View file

@ -139,6 +139,8 @@ public:
void setPeerId(session_t peer_id) { m_peer_id = peer_id; }
void on_successful_save();
private:
/*
serialize() writes a bunch of text that can contain