Skip to content
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

Relationships added in Post operation not visible from both directions until reindex #446

Open
eric-schleicher opened this issue Apr 18, 2016 · 8 comments

Comments

@eric-schleicher
Copy link
Contributor

Hello. I have a very complicated post operation that is creating some fairly well connected data but I've noticed something problematic (but non-blocking at the moment), but i would like to understand what's going on because I have a use-case where this would be a negative impact..

Description of the Problem
After a long series of post operations to create the data, it's easy to observer the relationship from the target to the source is not visible in CRUD. when flipping around (and looking form the owner to target) relationship is in place and visible. unsuprisingly, the behavious is the same through the REST services. so getting access the this node through the parent is not problematic, but requesting the target entity does not result in data that is consistent with the store.

From the target (note the box with no relationship) Figures 1.
image

And then from the other direction. Figures 2.
image

I've used my amazing annotation skills to further illustrate what's going on, in case it's a little confusing.
image

I wend into the Schema Admin panel and rebuilt the Indces, and sort of as expected the the relationships are visible as they should be once it completes. In this case (luckily) my application accesses the data via Rest through the entity that owns the relationship and there is usable. I have other use-cases which expect to write and immediately will traverse "up" the relationship chain and this issue seems to put that at risk, given that it's not suitable to perform maintenance tasks after such trivial DML operations (total of ~20 posts in series).

If it's of any concern, here is ordering of POST operations in the context of this relationship:
the Visualization (target) was written first, and then the RenderingParentRegion was written after it, and included the relationship id in the body of that post.

Any idea what's gong on?

This is reproducible 100% of the time.

@vigorouscoding
Copy link
Member

could you provide the output of /structr/rest/<ID>/ui for both objects so we can tell if this is an issue in the CRUD or if this is a general problem.

Alternatively you could limit the number of lines in the CRUD to 1. If the data shows up it looks like a display error.

@eric-schleicher
Copy link
Contributor Author

Rest output and crud were consistent (but wrong) from target to source.
Consistent and correct from source to target.

It didnt appear to be an issue with crud. This is 100% reproducible.

Running reindex clears it up.
On Apr 20, 2016 6:55 AM, "Kai Schwaiger" notifications@github.com wrote:

could you provide the output of /structr/rest//ui for both objects so
we can tell if this is an issue in the CRUD or if this is a general problem.

Alternatively you could limit the number of lines in the CRUD to 1. If the
data shows up it looks like a display error.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#446 (comment)

@vigorouscoding
Copy link
Member

ah, perfect! Reproducible bugs are the best ones. Could you describe a (preferrably small) test case?

@eric-schleicher
Copy link
Contributor Author

eric-schleicher commented Apr 26, 2016

I'll create a simple script with curl statements to reproduce. will that work?

@vigorouscoding
Copy link
Member

That would be awesome! If you could provide a Schema snapshot along with that script it would be most helpful :)

@vigorouscoding
Copy link
Member

Is this still a problem with the most recent snapshot? If so and you could provide the test case that would help fixing this bug tremendously.

@eric-schleicher
Copy link
Contributor Author

Hi Kai. This is on my radar.

I'm still running snapshot 33 from about 6 months ago, and intend to
introduce the current builds into by development environment in the next
week or so. I'm including this case as one to test.
-Eric

On Thu, Oct 20, 2016 at 6:54 AM, Kai Schwaiger notifications@github.com
wrote:

Is this still a problem with the most recent snapshot? If so and you could
provide the test case that would help fixing this bug tremendously.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#446 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH4Ql0a_28iqtsPknNUrDKQmaM1OtmU8ks5q13KMgaJpZM4IJTeC
.

@vigorouscoding
Copy link
Member

thank you! I'm looking forward to either crushing a bug or learning that someone (probably Christian) already fixed it :)

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

No branches or pull requests

2 participants