rawSQL.flushAllClientsCache not working on local client cach

Hi ,

We are using raw SQL to import data into our system in order to keep some kind of speed at importing (larger amounts of) data.
(1) We do (when needed) the newRecord() in the servoy foundset and the rest of the data is imported with raw sql to stay in sync with the Servoy pk counters which we use.

So we have to use the plugins.rawSQL.flushAllClientsCache() to get rid of outdated data in all client caches and the empty records (except for pk field) in the local client cache (1).
We received reports from users of ‘empty’ lines (records) after import. After restarting Servoy client the lines are filled with the imported data.

At testing at my developer site I see this also and I come to the conclusion that the plugins.rawSQL.flushAllClientsCache() does not (always ?) clears the local client cache. :(
When I issue databaseManager.refreshRecordFromDatabase() on the newly imported records just after the raw SQL filling of the fields the local data cache is updated just fine !

I assumed that AllClients also includes the local client…

Servoy 5.2.14

Any comments / thoughts please…

Regards,

Lambert,

Do you use databaseManager.switchServer()?
I recently fixed an issue with rawsql cache flushing icw databaseManager.switchServer()

Rob

Hi Rob,

That is certainly the case in my local test !

  1. Can your fix mean also something to the occasional reports we received of other users who don’t use switchServer() ?
  2. Will the fix be present in 5.2.15 ?

Thanks and regards,

Rob, can you elaborate a bit on that? I do use switch server and I noticed the same as Lambert, I simply refresh from database in the client that is calling raw sql to workaround that.
What bug did you fix? Is there something I’d better check?

Hi,

There was an issue with plugins.rawSQL.flushAllClientsCache().
The clients that were switched to the server were not always properly refereshing.
This is already fixed in 6.1, I now backported it to 6.0 and 5.2 and it is included in the upcoming 5.2.15 release.

Rob

Ok, I will update as soon as the new release is out.

Tnx Rob!