We develop in Postgres as follows:
- WinXP developer, local Sybase repository
- Linux Red Hat Postgres backend db and production repository
- Smart clients on internal network
Scenario:
- Stable release situation
- Developer adds records in live production tables to child table during testing of next release. Backend db has new records in it and local repository is in control.
- We synch up primary sequences for pk’s for all tables being impacted in step 2. These are Servoy managed autoenter sequences (not PG managed).
- PG has appropriate constraint running to ensure uniqueness of PK’s
- We generate a new release in developer and increment release #
- We use Servoy Admin (web based) to bring in new release
- We have the new release overwrite all settings on the way in
- Everything is fine during import and routine log in to solution.
- When adding a new child-table record (smart client against PG production and production repository) the db issues a PK duplicate key violation.
- When we check the production repository we see that none of the records added in step 2 have been incremented in the production repository data provider sequence controls.
- We have to use developer on the production repository to force the production repository sequences to be where they need to be. All is well again.
Question: Should not we be able to get production sequences automatically re-synched if we are in “full overwrite” mode (including auto-enter settings) during import of a new release?
We want to be able to develop on laptops off-site (local repository and db).
Are we doing something wrong?
Thanks, Michael
Michael,
Are you connecting with developer to the production system whilst using a separate repository for developer and server?
When that is the case the 2 sequences in both repo’s get out-of-sync.
It is better to test with developer on a copy of your production db in stead of on the real one.
If you have to test on the real one, make sure that at no time 2 repositories are used at the same time (stop server when you start developer).
Also you need to sync the sequences after you switch from developer back to server again since the server repo has not seen the new ids yet.
Hope this helps,
Rob
Thanks, Rob … we will adjust our processes. Best, Michael
rgansevles:
If you have to test on the real one, make sure that at no time 2 repositories are used at the same time (stop server when you start developer).
Doesn’t servoy server have to stay running so clients don’t get kicked off the system? If work is being done in the background on production while development is working on a future release (all work being done on the same repository) will this cause issues? Why?
From Servoy Developer Manual… Section 23.3 on Repository, Versioning:
“It is possible to have multiple releases of a solution; and to be developing in one release in Servoy Developer, while users are still connected to (are using) a previous release of the solution.”
So Servoy is designed for different ‘versions’ to used for production and development within the same solution and repository.
rgansevles:
Also you need to sync the sequences after you switch from developer back to server again since the server repo has not seen the new ids yet.
With a large client base it would be impractical to take the server off-line to sync the Servoy sequences during a rollout. Import ‘version 6’ from local development repository(laptop at the beach). Syncing the sequences could be done on ‘version 6’ while all the clients are on ‘verson 5’ along with any other minor tweeks/updates. ‘Version 6’ is activated and as clients log out/in they seamlessly roll up to the new verson.
This is how I see it should work from the paperwork. Please point out the obvious flaws in my thinking. And please explain your reasons so I can understand your logic (and the flaws in mine)
Thanks
Paul
Hi Paul,
Syncing the Servoy sequences are only an issue when you connect 2 different Servoy servers (in Server mode or in Developer mode) to the same data (not repository).
Yes when you run Developer you in fact (can) run Server (in developer mode) in the background.
Servoy sequences are stored in the repository so when you are using 2 different repositories and add data you can get out of sync.
Now when you develop with 2 different environments with each it’s own database for the data then there is no issue.
When you export the solution and import it into the production environment there is no need for Servoy sequence syncing.
Hope this helps.