Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7032745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:58:30+00:00 2026-05-28T00:58:30+00:00

I am new to App Engine and wrote a sample App. If i create

  • 0

I am new to App Engine and wrote a sample App. If i create or update a entity:

Entity record = new Entity(...);
... set properties
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
datastore.put(record);

and then redirect to a page where the new or updated entity is displayed

resp.sendRedirect("MainPage.jsp");

where the following code is executed

DatastoreService datastore =
DatastoreServiceFactory.getDatastoreService();   
Query query = new Query(...).addSort(..., Query.SortDirection.DESCENDING); 
List<Entity> entities = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(20));

The new record is not in the list. The page is updated (as shown by a timestamp displayed), but the new record or a modification of a existing record is shown only after a delay of up to some seconds when i refresh the page.

How can this be avoided?
Is the DataStore possible not suited for such a thing?

I am using the Eclipse local test environment from GAE with Windows XP 64.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:58:30+00:00Added an answer on May 28, 2026 at 12:58 am

    Yeah, this is called “eventual consistency” and is the default update model for HRD (now default on all new instances).

    So putting an entity and then querying for it might not get is back (evental consistency), but putting it and then getting it (get via a key) will get it back immediately (strong consistency).

    Solution is either to:

    1. Use Master-slave datastore, or
    2. If possible, rewrite code to use get instead of queries.

    Also, local dev server is only for testing and does not behave exactly as production instances, so you should always (eventually) test on production.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an entity in my app engine datastore. There's actually only one instance
First off, I'm relatively new to Google App Engine, so I'm probably doing something
The latest Google App Engine release supports a new Task Queue API in Python.
I am relatively new to python and app engine, and I just finished my
I'm building an app on Google App Engine. I'm incredibly new to Python and
i am trying to use velocity framework on google app engine. i wrote a
I've been writing an app using the awesome new Razor view engine and for
I'm new to Python, and I'm using Google App Engine to build a simple
I'm architecting a new app at the moment, with a high read:write ratio. At
I have a new app I'll be working on where I have to generate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.