{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • BaaS/Usergrid /
avatar image
1
Question by Toto Circles · Sep 20, 2015 at 02:29 PM · 373 Views baaserrordata

GET on resource not returning anything but Duplicate error on POST

I have a 'Create entity if does not exist' logic in my code.

In the code the GET returns no object but the POST returns a Duplicate error for some entities. Does anyone know how such an inconsistency can happen? Kindly help!

Looks like the resource with name 'Branch Data 1' already exists but not returned in GET and also not returned when queried on the Apigee front end.

GET response:

response.body = { "action" : "get", "application" : "xxxxxxxx", "params" : { "ql" : [ "name='Branch Data 1'" ] }, "path" : "/zzzz", "uri" : "https://api.usergrid.com/zzzz/yyyy/xxxx", "entities" : [ ], "timestamp" : 1442757941290, "duration" : 7, "organization" : "zzzz", "applicationName" : "yyyy", "count" : 0 }

POST to create Error:

response.body = {"error":"duplicate_unique_property_exists","timestamp":1442757947495,"duration":0,"exception":"org.apache.usergrid.persistence.exceptions.DuplicateUniquePropertyExistsException","error_description":"Entity yyyy requires that property named name be unique, value of Branch Data 1 exists"}

Comment
Add comment Show 8
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image brandon@apigee.com ♦ · Sep 20, 2015 at 05:16 PM 0
Link

Are you for sure querying the correct collection? Can you reproduce this behaviour using cURL?

avatar image jwest1 ♦ · Sep 22, 2015 at 02:53 PM 0
Link

Can you please share a curl command which we can use to reproduce the problem? Thanks!

avatar image Toto Circles jwest1 ♦ · Sep 29, 2015 at 01:12 PM 0
Link

Thanks for your responses. I am using usergrid_iron in ruby to query the collection on production. I unfortunately do not have the curl command.

Also, The issue is reproducible from the apigee front end too.

Example when I submit this query through the front end, apigee does not return any data.

select * where name = 'Singapore Pools Great World City Branch'

But when I try to post the data { "name": "Singapore Pools Great World City Branch" } through the apigee front end I get this error:

error: Entity totocentre requires that property named name be unique, value of Singapore Pools Great World City Branch exists

There is some issue in some data being fetched. I am sure this data was inserted a few months ago but the GET query is not returning the data. Kindly help!

avatar image jwest1 ♦ Toto Circles · Sep 29, 2015 at 01:35 PM 0
Link

This is probably related to repair jobs needing to be run in Cassandra, which we will look into. Are you using api.usergrid.com?

Show more comments
avatar image dmitry_zhivushko1 · Jun 28, 2016 at 01:37 PM 0
Link

was this resolved? I believe we have exactly the same issue in our Usergrid instance

avatar image Toto Circles dmitry_zhivushko1 · Aug 06, 2016 at 09:14 AM 0
Link

Hi Apigee team, @jwest1, Can you kindly help with this issue. Is there any way to recover the data? Would really appreciate any work around for this. Its extremely critical for my app to recover this data.

The summary page shows the correct count for the entities, but when we try to query the data, more than half the data is missing.

Close

2 Answers

  • Sort: 
avatar image
-1

Answer by williamking · Sep 21, 2015 at 02:06 PM

Do you get any results if you run your GET request without the QL parameter? I believe there might be something going on the backend processing requests with a QL value.

Comment
Add comment Show 3 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jwest1 ♦ · Sep 29, 2015 at 01:34 PM 0
Link

Hi William -

You have a paid instance of BaaS which is different from Apigee Developer and from other customers.

avatar image williamking jwest1 ♦ · Sep 29, 2015 at 03:05 PM 0
Link

The description provided by @Mathew almost exactly matches the issues I've been having. A query against an entity that should provide a result does not. You can access the entity directly via its UUID or by iterating through all entities. But you you add in the QL to filter results, you get nothing back. The main difference is that his query is against the unique name property.

avatar image jwest1 ♦ williamking · Sep 29, 2015 at 03:12 PM 0
Link

Yes, I understand the difference. api.usergrid.com runs version 1.0 whereas most customer instances run 2.0 which have major differences. In this case the duplicate unique property is related to something in Cassandra and how unique values are mangled on a per-collection basis. This would indicate that the unique value for the specified collection was not cleaned up when the entity was deleted. This is different than the issues you are experiencing with querying.

avatar image
0

Answer by pchidambaram · Mar 18, 2016 at 06:52 AM

Hi,

We are now facing the kind of issue. When GET no resource returning, but try to POST, getting the below error.

Response:

{ "error": "duplicate_unique_property_exists", "timestamp": 1458282731176, "duration": 0, "error_description": "Entity \"payment_transaction\" requires that property named \"name\" be unique, value of 531b7f81-2710-2839-16af-8fb69f98f543 exists", "exception": "org.apache.usergrid.persistence.exceptions.DuplicateUniquePropertyExistsException" }

Note: We are using paid instance of BaaS.

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Baas Modifying Data Structure 1 Answer

Getting Error (500)(no_node_available): None of the configured nodes are available: [] 0 Answers

Apigee cannot update / delete user - HectorException 1 Answer

Data Consistency Issue 2 Answers

Need Help with Push Notifications 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges