Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

[IMP] test_server: Patch odoo to create unlogged DB tables #573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moylop260
Copy link
Contributor

This commit causes Odoo to be patched so all database tables are created
as unlogged.

  • Increase the performance of I/O Disk for runbot build instances.
  • Runbot doesn't need a logged table since that the instances are of demo and the container died after a while.

Disadvantage:
If a container is stopped without stop postgresql service then the data will be corrupted... but for the case of runbot currently if a container is stopped then the build is killed too. Then this is not a real disadvantage for that environment.

This is compatible with the odoo versions >=7.0.

Co-authored by: Luis González (luisg123v)

Copy link
Member

@gurneyalex gurneyalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need a mention of this in the README.

But apart from that I'm +1

@pedrobaeza
Copy link
Member

What is the average performance boost?

@pedrobaeza pedrobaeza requested a review from yajo September 12, 2018 07:13
@sbidoul
Copy link
Member

sbidoul commented Sep 12, 2018

@moylop260 very interesting!

@gurneyalex out of curiousity, what is the size of the wal director(ies) on runbot? Would it make sense to address this at the system level, ie by storing wals on a ram disk or ssd?

@@ -312,6 +337,11 @@ def main(argv=None):
test_enable = str2bool(os.environ.get('TEST_ENABLE', True))
dbtemplate = os.environ.get('MQT_TEMPLATE_DB', 'openerp_template')
database = os.environ.get('MQT_TEST_DB', 'openerp_test')
is_runbot = str2bool(os.environ.get('RUNBOT'))
is_gitlab_ci = str2bool(os.environ.get('GITLAB_CI'))
is_travis_ci = str2bool(os.environ.get('TRAVIS'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you consider travis CI?

Remember Travis CI manages its own PostgreSQL settings which may not be customized AFAIK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not patching PostgreSQL.
I'm patching odoo to create "unlogged" tables and travis kill the build after success then IMHO It is a good site to use "unlogged" too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit causes Odoo to be patched so all database tables are created
as unlogged.

This is applied only for testing instances because, if a docker
container is stopped without firstly saving the changes, all records
will be deleted; so it's not suitable for working under other
environments, e.g. locally.

This is compatible with the odoo versions >=7.0.

Co-authored-by: Luis González <[email protected]>
@gurneyalex
Copy link
Member

gurneyalex commented Sep 14, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants