Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

path fields - bootstrap broken in 8.0-7 #850

Closed
joecrean opened this issue Sep 26, 2017 · 7 comments
Closed

path fields - bootstrap broken in 8.0-7 #850

joecrean opened this issue Sep 26, 2017 · 7 comments
Assignees
Milestone

Comments

@joecrean
Copy link

Bug Template

Short description of the problem:

Since the upgrade to MarkLogic 8.0-7 roxy bootstrap fails in an environment where the application was already deployed (and by converse it does not fail in a fresh environment).
Path namespaces are removed and then added every time bootstrap runs. In order to remove them we first need to check if they are being used. They can be used in Path Range Index definitions, elements containing Geospatial co-ordinates and Field definitions. The API used to delete the path namespaces is called admin:database-delete-path-namespace. This API will check to see if the namespaces are in use before deletion and in 8.0-7 this has been tightened up to additionally check field definitions. If there are field definitions present with paths the deletion will fail with the exception ADMIN-PATHNAMESPACEINUSE.

What are the steps to reproduce the problem?

  1. Create a field with a path and path namespace definition
  2. bootstrap (this will succeed)
  3. bootstrap again (this will fail)

Tech Specs

Which Operating System are you using? CentOS 7

Which version of MarkLogic are you using? 8.0-7

Which version of Roxy are you using (see version.txt)? 1.7.6

@joecrean
Copy link
Author

Folks, i have already created a fix for this locally and am happy to submit this in a PR. If so please let me know how you want it.. (i assume create a new branch off master and create the PR from that).. just in case you have any specific procedures.. just let me know

@dmcassel
Copy link
Collaborator

Hi @joecrean. We've got a CONTRIBUTING.md file that shows how to submit a PR for this project. Part of it is using a feature branch off the dev branch, rather than master. Your PR would be welcome.

joecrean pushed a commit to joecrean/roxy that referenced this issue Sep 28, 2017
Since the upgrade to MarkLogic 8.0-7 roxy bootstrap fails in an
environment where the application was already deployed (and by converse
it does not fail in a fresh environment).

Path namespaces are removed and then added every time bootstrap runs.
In order to remove them we first need to check if they are being used.
They can be used in Path Range Index definitions, elements containing
Geospatial co-ordinates and Field definitions. The API used to delete
the path namespaces is called admin:database-delete-path-namespace.
This API will check to see if the namespaces are in use before
deletion and in 8.0-7 this has been tightened up to additionally
check field definitions.

Up to now roxy has simply deleted and re-added ALL path range indexes
and their namespaces which in itself could cause lots of re-indexing.
Now with the stricter API we would need to delete and re-add field
range indexes. This is clearly a bad direction and for that reason
this solution, detects what has changed and only removes indexes when
it is really necessary.
@joecrean
Copy link
Author

created pull request for this

joecrean pushed a commit to joecrean/roxy that referenced this issue Sep 28, 2017
Since the upgrade to MarkLogic 8.0-7 roxy bootstrap fails in an
environment where the application was already deployed (and by converse
it does not fail in a fresh environment).

Path namespaces are removed and then added every time bootstrap runs.
In order to remove them we first need to check if they are being used.
They can be used in Path Range Index definitions, elements containing
Geospatial co-ordinates and Field definitions. The API used to delete
the path namespaces is called admin:database-delete-path-namespace.
This API will check to see if the namespaces are in use before
deletion and in 8.0-7 this has been tightened up to additionally
check field definitions.

Up to now roxy has simply deleted and re-added ALL path range indexes
and their namespaces which in itself could cause lots of re-indexing.
Now with the stricter API we would need to delete and re-add field
range indexes. This is clearly a bad direction and for that reason
this solution, detects what has changed and only removes indexes when
it is really necessary.
@heelix
Copy link

heelix commented Oct 19, 2017

If possible, we could really use this fix. We've been waiting for it to get merged in before deploying it.

@heelix
Copy link

heelix commented Jan 9, 2018

Did this fix actually get merged in?

@grtjn
Copy link
Contributor

grtjn commented Jan 9, 2018

Unfortunately not, let me see if I can finish reviewing this. I need to take a close look at the changes..

grtjn added a commit to grtjn/roxy that referenced this issue Jan 10, 2018
…arklogic-community#863: metadata fields, geo path indexes, and path namespaces fix
grtjn added a commit that referenced this issue Jan 10, 2018
Fixed #834, Fixed #850, Fixed #863: metadata fields, geo path indexes,  and path namespaces fix
@grtjn grtjn self-assigned this Jan 10, 2018
@grtjn grtjn added this to the January 2018 milestone Jan 10, 2018
@grtjn
Copy link
Contributor

grtjn commented Jan 10, 2018

Fixed in dev

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants