Comments (10)
Could you investigate a little and find out what actually happens?
from mormot2.
Batch prepared correct, but something happened in BatchSend, i suppose, because i've got error when step-by-step debug "TSqlDBPostgresStatement.ExecutePrepared: Invalid array type ftBlob on bound parameter #3" (it is one of my blob fields) "in mormot.db.sql.postgres.pas line 656"
from mormot2.
Please try with this last commit.
from mormot2.
It works now, but only if there is no deleted rows. If i have any deleted row - table doesn't synchronise at all.
Maybe it affected not only tables with blobs, i don't know. In my case i do not delete rows in another tables.
from mormot2.
I am not able to reproduce this behavior.
from mormot2.
I create some orms on master
Then i created TOrm (1,2,3,4,5,6) with blob on master
Then delete record 4 with blob on master
then create some other orms on master
Then synchronise from master (sqlite) to slave (postgresql) (calling RecordVersionSynchroniseSlave from slave).
Nothing synchronised for TOrm (where i delete record), other orms synchronised well .
If i only create TOrm on master (do not delete) - synchronise works ok
from mormot2.
In step-by-step debug i've got error
"Unexpected TSqlDBPostgresConnectionProperties.SharedTransaction (1,2)" in mormot.db.sql line 3701
Maybe it's because in prepared for sending batch i see in JSON that DELETE goes before all other lines? But this record cannot be deleted, it doesn't exist on slave server yet.
from mormot2.
fails on TRestOrmServerBatchSend.AutomaticCommit after sequence POST-POST-POST-POST-DELETE-POST if ID for delete doesn't exists. Can't find out reason yet. No error message except "TSqlDBPostgresConnectionProperties.SharedTransaction( )"
upd: If i comment whole part for encDelete in TRestOrmServerBatchSend.ExecuteValue it fails too with the same exception
from mormot2.
Sorry for the late reaction.
What does "if ID for delete does not exist" mean in your case?
from mormot2.
Sorry for the late reaction.
What does "if ID for delete does not exist" mean in your case?
I mean that record was deleted only on master db, it doesn't exist on slave db (sync was made after modifications on master db as i wrote before)
But when synchronization starts it tries to delete record which doesn't exist on slave db.
I suppose it's because of different transactions in post and delete chains
from mormot2.
Related Issues (20)
- Strange behavior of ReadLn. HOT 3
- Issue with `JsonToVariantDynArray` HOT 2
- Windows API Multiple defined symbols HOT 1
- "AutoFlushTimeOut" property does not work. HOT 4
- While compiling mormot.db.sql.ibx gives compile error on Delphi 12! HOT 2
- Compile issue with test/mormot2tests.dproj on current master branch HOT 3
- TSqlDBOleDBMSSQL2018ConnectionProperties should set fProviderName before calling SetInternalProperties HOT 1
- static-lib unit bug
- Circular Reference Issue in Project04InterfaceBasedServer.dproj in martin-doyle's example 04-InterfacedBasedServices HOT 4
- Exported package threadvar CurrentThreadName HOT 1
- AesNiEncrypt256 and others do not preserve xmm6-xmm15 HOT 2
- Would it be of interest to automated tests run on GitHub Actions? HOT 2
- Cannot compile in Delphi with a Linux 64 target HOT 4
- sqlite3.o: undefined reference to `fcntl64' HOT 4
- Exception in mormot.crypt.core.asmx64.inc._AesNiHashXmm0 HOT 2
- THttpServer - Process ClientSock don't capture RemotePort HOT 1
- THttpServerRequestAbstract - RemoteIP equals 127.0.0.1 HOT 1
- How to use synpdf to add latex or mathml to a PDF? HOT 1
- Not all tests passed HOT 2
- error while compiling mormot.core.test from lazarus package if NOEXCEPTIONINTERCEPT is set HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mormot2.