-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map disappearing after creation + redirect to dashboard #5264
Comments
I just noticed that this morning I created this example: http://bl.ocks.org/iriberri/a19efabe08ff2408f2f0 and the visualization does no longer exist. I haven't deleted it. 😢 |
Hi team, this is seems to be happening outside my account. SB/6496255 |
If is important, assign somebody from BE as santana is on vacations this days, but I'm overloaded with tickets and the "big feature" of this sprint so I cannot help you right now :( |
It looks like we're creating the table without registering. Ghost tables shouldn't be triggered at all. |
This only happens with new empty tables, with new maps created from imports everything is 👍 By the way, the table lives after the ghost table drops and registers (and the contents are there) |
Related with oid changes: #3717 |
First creation of the table:
Going to dashboard, I see how it gets removed from the user_tables table. After some time, I see the new record for it:
|
The scenario is roughly as follows:
Things to check:
|
Comment out call to ghost tables #5264
Got a trace of the full scenario by adding some traces to the code:
|
A bit of explanation about this fix: - Table.create_table_in_database! is a private method - It is invoked from Table.before_create when it is not a migration nor a register of the table, that is, only when creating empty tables. E.g: from TablesController.create - cartodbfy will be called a bit later, but it will be idempotent (no further changes). - If you look into Table.before_create, it will invoke Table.set_table_id which is the right place to edit such a thing (the OID of the just created use rtable). So this is not the perfect solution, but is the one that solves the problem at hand minimizing side effects.
- schema(:reload) is no longer responsiblity of cartodbfy - do not call set_the_geom_column! when creating a new table (it will set it to nil anyway) - call explicitly schema(:reload) where needed
This is what we got right now: digraph cartodbfy {
Table_before_create -> Table_import_cleanup [label="if migrate_existing_table.present?"];
Table_import_cleanup -> Table_cartodbfy;
Table_cartodbfy -> CDB_CartodbfyTable;
Table_after_create -> Table_cartodbfy;
Synchronization_Adapter_cartodbfy -> Table_import_cleanup;
Synchronization_Adapter_cartodbfy -> Table_cartodbfy;
Relocator_TableDumper_migrate -> CDB_CartodbfyTable;
SchemaDumper_migrate -> CDB_CartodbfyTable;
} That explains the mess with double calls to cartodbfy. |
What's in this commit: - import_cleanup is no longer responsible for cartodbfy nor schema reload. Also added a comment about overlap with cartodbfy and future deletion. - before_create executes always 2 steps at the end of the process: reload schema and set_table_id. - cartodbfy is no longer responsible for reloading schema. - after_create does no longer call cartodbfy.
import_cleanup used to call cartodbfy as the last step. Not anymore (there are good reasons for that). Instead just call cartodbfy explicitly once right after the import_cleanup and delete the other call. Take into accout successive calls are meant to be "idempotent". So, no effect other than wasting time.
I've only been able to reproduce this issue in my own team account (
iriberri
), but these are the steps:cc @Kartones @javisantana
The text was updated successfully, but these errors were encountered: