Hi Rajesh,
Currently, there is no programmatic to get the entities or the number of entities involved in a Datastore transaction, but you should be able to determine them and their number in your own code through explicit design:
- No more than 25 entities in a transaction if using top-level entities
- No more than 25 distinct parents if using child entities
Note that there was a feature request for “System limits should be available via constants” previously made on the Google Cloud API third-party site and can be followed here. However, if you would like to submit your own FR for retrieving datastore entities via a flag in an App Engine application, you can do so on this Public Issue Tracker.
Also, if by any chance you are using the Java Standard Environment, make sure to enable the cross-group transactions option allowing to operate across multiple entity groups. See here for more information about transaction options available to this environment.
Regards,
Alex