terra-sync / cnc

Seamless Database Replication tool
GNU General Public License v3.0
4 stars 2 forks source link

Minor issues to be fixed #48

Open panosfol opened 4 months ago

panosfol commented 4 months ago

This issue keeps track of all the general issues that need attention in our codebase:

charmitro commented 4 months ago

[ ] db.c:36 : we should not return if the connection fails in one of the databases.

Not sure about that...

Let's think this scenario

A user has 2 databases in his config file, a postgres and a Mongo (assuming we support it) and first in operation is Postgres, which fails for whatever reason, does he want to continue with Mongo replication?


[ ] postgres.c : there are malloc'd values that are not freed, should the connection with postgres fails. (This might lead to a bigger issue of keeping track of all the pointers that need to be freed in the various stages of the replication progress.)

I'll investigate and return to this later.

panosfol commented 4 months ago

[ ] db.c:36 : we should not return if the connection fails in one of the databases.

Not sure about that...

Let's think this scenario

A user has 2 databases in his config file, a postgres and a Mongo (assuming we support it) and first in operation is Postgres, which fails for whatever reason, does he want to continue with Mongo replication?

[ ] postgres.c : there are malloc'd values that are not freed, should the connection with postgres fails. (This might lead to a bigger issue of keeping track of all the pointers that need to be freed in the various stages of the replication progress.)

I'll investigate and return to this later.

Yes i believe he should continue with Mongo replication. If a user tries to replicate a lot of databases and he made a mistake in the configuration, shouldn't he just 'lose' replication process on only one? There is some time wasted for him if all failed right?

charmitro commented 4 months ago

Yes i believe he should continue with Mongo replication. If a user tries to replicate a lot of databases and he made a mistake in the configuration, shouldn't he just 'lose' replication process on only one? There is some time wasted for him if all failed right?

I agree but I also believe that users should be able to disable this. Let's leave it as is for now (since we support only one database) and we change it to not return later, plus a quit_on_error config field under [general].