diff options
author | Loïc Blot <loic.blot@unix-experience.fr> | 2019-01-04 10:20:04 +0100 |
---|---|---|
committer | Loïc Blot <loic.blot@unix-experience.fr> | 2019-01-04 10:20:04 +0100 |
commit | c1d7dbfc38e8f48b42d957afad2696a8e56b740b (patch) | |
tree | 53db583fc199c9eb096c15e6ffa6c85539a54c0d /src/remoteplayer.h | |
parent | 07177190734b0e5c17be18d0bf5d509c5226af2f (diff) | |
download | minetest-c1d7dbfc38e8f48b42d957afad2696a8e56b740b.tar.gz minetest-c1d7dbfc38e8f48b42d957afad2696a8e56b740b.tar.bz2 minetest-c1d7dbfc38e8f48b42d957afad2696a8e56b740b.zip |
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
Diffstat (limited to 'src/remoteplayer.h')
-rw-r--r-- | src/remoteplayer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/remoteplayer.h b/src/remoteplayer.h index ed0f21b42..212741df8 100644 --- a/src/remoteplayer.h +++ b/src/remoteplayer.h @@ -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 |