I have the following entity (specified via JDO):
@PersistenceCapable(
identityType = IdentityType.APPLICATION, detachable = "true")
public class Subscription {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String user;
@Persistent(defaultFetchGroup = "true")
private Link feedUrl;
@Persistent(defaultFetchGroup = "true")
@Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
private Link hubUrl;
@Persistent
@Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
private String title;
@Persistent(defaultFetchGroup = "true")
@Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
private Set<String> seenEntryIds;
}
(see full entity definition here)
It has only three indexed properties, id, user and feedUrl. When running on the dev server, the console says that each entity results in 6 write ops.
However, when running in production, the quota details page says that there have been 4,276 entity put ops, and 164,110 index write ops, which gives an average of 38 index writes per entity. That’s much higher than I would expect, and also much higher than what the dev server shows.
I added the gae.unindexed property late yesterday, and pushed the change then too. I would therefore expect all of the entity puts that happen today (which is what the quota details page reports) to not reflect any of the extra index writes.
My first guess was that had an old
WEB-INF/datastore-indexes.xmllaying about, but you don’t appear to have one (and it isn’t in your.gitignore).What’s the mean size of the
seenEntryIdsset? If it’s ~16, that gives me an idea for a test case.