我将数据库从Master slave迁移到HRD(google appengine)并遇到了多个问题:
迁移前我们有81543条记录,迁移后只有71669条记录。我们不确定为什么缺少数千条记录
迁移前 - http://snag.gy/bwbx2.jpg 迁移后 - http://snag.gy/r6IAo.jpg
Ex:“users”表包含用户 - demo1@xyz.com和GQL查询
select * from users where user_id='demo1@xyz.com'
API调用失败:
Query query = new Query("users");
query.addFilter("user_id", FilterOperator.EQUAL, request.getParameter("user_id"));
// Get Datastore
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
// PreparedQuery contains the methods for fetching query results
// from the datastore
PreparedQuery pq = datastore.prepare(query);
// Get Results
for (Entity result : pq.asIterable())
{
System.out.println("result = " + result);
}
有人可以请尽快帮忙。
由于