gentics / mesh

Gentics Mesh - The open source headless CMS for developers
https://getmesh.io
Apache License 2.0
569 stars 117 forks source link

/Sync doesn't populate nodes in elasticsearch #1204

Open DavidOrtizR opened 3 years ago

DavidOrtizR commented 3 years ago

Gentics Mesh Version, operating system, or hardware.

Operating System

Elasticsearch 7.7.0

Problem

/search/sync doesn't work properly.

Reproducer

1.-Create a new export file using the API /admin/graphdb/export 2.- Import using /admin/graphdb/import 3.- Clear indexes /search/clear 4.- Sync indexes using /search/sync

Expected behaviour

After restoring a backup or importing an export file and clear (/search/clear) and sync (/search/sync), the indexes in elasticseach should be populated as before.

Actual behaviour

After restoring a backup or importing an export file and clear (/search/clear) and sync (/search/sync), the indexes in elasticseach are empty

DavidOrtizR commented 3 years ago

Hi @plyhun, any updates on this topic?

plyhun commented 3 years ago

Hi @DavidOrtizR , I have just checked the described behavior at the following environment:

  1. export at Mesh 1.6.16, import at clean Mesh 1.7.14
  2. export at Mesh 1.7.14, clean it by deleting the graphdb folder, import back at 1.7.14.

Both usecases reported the same results:

{
  "available": true,
  "metrics": {
    "tagfamily": {
      "insert": {
        "synced": 6,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 0,
        "pending": 0
      }
    },
    "schema": {
      "insert": {
        "synced": 17,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 3,
        "pending": 0
      }
    },
    "node": {
      "insert": {
        "synced": 4235,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 0,
        "pending": 0
      }
    },
    "role": {
      "insert": {
        "synced": 4,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 2,
        "pending": 0
      }
    },
    "microschema": {
      "insert": {
        "synced": 1,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 0,
        "pending": 0
      }
    },
    "project": {
      "insert": {
        "synced": 2,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 0,
        "pending": 0
      }
    },
    "tag": {
      "insert": {
        "synced": 2,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 0,
        "pending": 0
      }
    },
    "user": {
      "insert": {
        "synced": 1214,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 2,
        "pending": 0
      }
    },
    "group": {
      "insert": {
        "synced": 5,
        "pending": 0
      },
      "update": {
        "synced": 0,
        "pending": 0
      },
      "delete": {
        "synced": 2,
        "pending": 0
      }
    }
  }
}

e.g. the schemas and nodes have been synced. Couldn't you please try with the latest v1.7.14, and monitor the logs during the backup/restore/index sync? Thanks in advance!

danfabi commented 2 years ago

Having the same issue here (v1.7.22).