Datastore save operations incomplete when series of writes happens
Description
I have a code such that it writes records to different tables one after the other. I have been struggling with an issue where some of the writes don't show up in a DDB table and they also don't throw any errors. When I add breakpoints and execute the code line by line, they all work properly.
Code looks something like this.
...
await tableOneRepo.save(infoOne);
.
.
await tableTwoRepo.save(infoTwo);
.
.
await tableThreeRepo.save(infoThree);
.
.
await tableFourRepo.save(infoThree);
...
I tried running the app from Xcode, and I saw an error message like this. AppBadgeCount is the table that continues to fail to insert the record.
2022-09-23 23:31:39.136612+0900 Runner[95535:5375337] flutter: DataStoreException(message: Received a create mutation for an item that has already been created, recoverySuggestion: Review your app code and ensure you are not issuing incorrect DataStore.save() calls for the same model. Candidate model is below:
MutationEvent(id: "0708D155-3171-4D8B-9425-C7879B9B45E5", modelId: "ce2b6fe8-225c-483f-9b08-143dd1a9ed1c", modelName: "AppBadgeCount", json: "[{\"profile_id\":\"ce2b6fe8-225c-483f-9b08-143dd1a9ed1c\",\"__typename\":\"AppBadgeCount\",\"id\":\"ae9d5db6-3cd3-4e5d-9fcc-6f90f2a57a63\",\"count\":0,\"updatedAt\":null,\"createdAt\":null}]", mutationType: "create", createdAt: Amplify.Temporal.DateTime(foundationDate: 2022-09-23 14:31:39 +0000), version: nil, inProcess: false, graphQLFilterJSON: nil), underlyingException: null)
When I try to add a record to this table only, it works fine. I'm wondering if there is any throttling taking in place. I'm currently writing to about 10 tables in a row.
I have automerge enabled.
Categories
- [ ] Analytics
- [ ] API (REST)
- [X] API (GraphQL)
- [ ] Auth
- [ ] Authenticator
- [X] DataStore
- [ ] Storage
Steps to Reproduce
No response
Screenshots
No response
Platforms
- [X] iOS
- [ ] Android
- [ ] Web
- [ ] macOS
- [ ] Windows
- [ ] Linux
Android Device/Emulator API Level
No response
Environment
[✓] Flutter (Channel stable, 3.3.2, on macOS 12.4 21F79 darwin-arm, locale en-US)
• Flutter version 3.3.2 on channel stable at /Users/skim/Workspace/tools
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e3c29ec00c (9 days ago), 2022-09-14 08:46:55 -0500
• Engine revision a4ff2c53d8
• Dart version 2.18.1
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/skim/Library/Android/sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13F100
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.71.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.48.0
[✓] Connected device (3 available)
• SUNG WOOK’s iPhone (mobile) • 00008101-000125843CF9001E • ios • iOS 15.6.1 19G82
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.125
[✓] HTTP Host Availability
• All required HTTP hosts are available
Dependencies
Dart SDK 2.18.1
Flutter SDK 3.3.2
dependencies:
- amplify_api 0.6.8 [amplify_api_android amplify_api_ios amplify_core amplify_flutter aws_common collection flutter meta plugin_platform_interface]
- amplify_api_ios 0.6.8 [amplify_core flutter]
- amplify_auth_cognito 0.6.8 [amplify_auth_cognito_android amplify_auth_cognito_ios amplify_core aws_common collection flutter meta plugin_platform_interface]
- amplify_authenticator 0.2.3 [amplify_auth_cognito amplify_core amplify_flutter async aws_common collection flutter flutter_localizations intl stream_transform]
- amplify_core 0.6.8 [aws_common collection flutter intl json_annotation meta plugin_platform_interface uuid]
- amplify_datastore 0.6.8 [flutter amplify_datastore_plugin_interface amplify_core plugin_platform_interface meta collection async]
- amplify_datastore_plugin_interface 0.6.8 [amplify_core collection flutter meta]
- amplify_flutter 0.6.8 [amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios aws_common collection flutter meta plugin_platform_interface]
- amplify_storage_s3 0.6.8 [amplify_storage_s3_android amplify_storage_s3_ios amplify_core aws_common flutter meta plugin_platform_interface path_provider path]
- cached_network_image 3.2.1 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web]
- checkbox_formfield 0.2.0 [flutter]
- cron 0.5.0 [clock]
- cupertino_icons 1.0.5
- dotted_border 2.0.0+2 [flutter path_drawing]
- dropdown_button2 1.6.3 [flutter]
- email_validator 2.0.1
- firebase_core 1.21.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_messaging 12.0.3 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_app_badger 1.4.0 [flutter]
- flutter_bloc 8.1.1 [flutter bloc provider]
- flutter_feather_icons 2.0.0+1 [flutter]
- flutter_google_places 0.3.0 [flutter google_api_headers google_maps_webservice http rxdart]
- flutter_image_compress 1.1.0 [flutter]
- flutter_local_notifications 9.8.0+1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_slidable 2.0.0 [flutter]
- flutterfire_cli 0.2.4 [ansi_styles args ci cli_util deep_pick file interact meta path platform pub_updater pubspec xml]
- geocoder2 1.3.0 [flutter http]
- geocoding 2.0.4 [flutter geocoding_platform_interface]
- geolocator 9.0.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- google_maps_flutter 2.2.0 [flutter google_maps_flutter_android google_maps_flutter_ios google_maps_flutter_platform_interface]
- google_maps_webservice 0.0.20-nullsafety.5 [http meta json_annotation]
- google_mobile_ads 2.0.1 [meta flutter visibility_detector]
- google_place 0.4.7 [http]
- image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- intl 0.17.0 [clock path]
- material_design_icons_flutter 5.0.6595 [flutter]
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- percent_indicator 4.2.2 [flutter]
- permission_handler 10.0.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface]
- provider 6.0.3 [collection flutter nested]
- quiver 3.1.0 [matcher]
transitive dependencies:
- amplify_api_android 0.6.8 [flutter]
- amplify_auth_cognito_android 0.6.8 [flutter]
- amplify_auth_cognito_ios 0.6.8 [amplify_core flutter]
- amplify_flutter_android 0.6.8 [flutter]
- amplify_flutter_ios 0.6.8 [amplify_core flutter]
- amplify_storage_s3_android 0.6.8 [flutter]
- amplify_storage_s3_ios 0.6.8 [flutter]
- ansi_styles 0.3.2+1
- args 2.3.1
- async 2.9.0 [collection meta]
- aws_common 0.1.1 [async collection http meta stream_transform uuid]
- bloc 8.1.0 [meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface]
- characters 1.2.1
- ci 0.1.0
- cli_util 0.3.5 [meta path]
- clock 1.1.1
- collection 1.16.0
- cross_file 0.3.3+1 [js meta]
- crypto 3.0.2 [typed_data]
- dart_console 1.1.1 [ffi win32 intl]
- dbus 0.7.3 [args ffi meta xml]
- deep_pick 0.10.0
- fake_async 1.3.1 [clock collection]
- ffi 1.2.1
- file 6.1.2 [meta path]
- firebase_core_platform_interface 4.5.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 1.7.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_messaging_platform_interface 4.1.2 [firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.1.2 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- flutter_blurhash 0.7.0 [flutter]
- flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid]
- flutter_local_notifications_linux 0.5.1 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories]
- flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_plugin_android_lifecycle 2.0.6 [flutter]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- geocoding_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- geolocator_android 4.0.2 [flutter geolocator_platform_interface]
- geolocator_apple 2.2.1 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.0.6 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.1 [flutter geolocator_platform_interface]
- google_api_headers 1.3.0 [flutter package_info_plus]
- google_maps_flutter_android 2.3.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface stream_transform]
- google_maps_flutter_ios 2.1.11 [flutter google_maps_flutter_platform_interface stream_transform]
- google_maps_flutter_platform_interface 2.2.2 [collection flutter plugin_platform_interface stream_transform]
- http 0.13.4 [async http_parser meta path]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- image_picker_android 0.8.5+1 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.5+6 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.5.0 [cross_file flutter http plugin_platform_interface]
- interact 2.1.1 [dart_console meta tint]
- js 0.6.4
- json_annotation 4.5.0 [meta]
- matcher 0.12.12 [stack_trace]
- material_color_utilities 0.1.5
- meta 1.8.0
- nested 1.0.0 [flutter]
- octo_image 1.0.2 [flutter flutter_blurhash]
- package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32]
- path 1.8.2
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.0.16 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.10 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.7 [ffi flutter path path_provider_platform_interface win32]
- pedantic 1.11.1
- permission_handler_android 10.0.0 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface]
- permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface]
- petitparser 5.0.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- process 4.2.4 [file path platform]
- pub_semver 2.1.1 [collection meta]
- pub_updater 0.2.2 [http json_annotation process]
- pubspec 2.3.0 [path pub_semver yaml uri]
- rxdart 0.26.0
- sky_engine 0.0.99
- source_span 1.9.0 [collection path term_glyph]
- sqflite 2.0.3 [flutter sqflite_common path]
- sqflite_common 2.2.1+1 [synchronized path meta]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.1 [source_span]
- synchronized 3.0.0+2
- term_glyph 1.2.1
- test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.8.0 [path]
- tint 2.0.0
- typed_data 1.3.0 [collection]
- uri 1.0.0 [matcher quiver]
- uuid 3.0.6 [crypto]
- vector_math 2.1.2
- visibility_detector 0.3.3 [flutter]
- win32 2.6.1 [ffi]
- xdg_directories 0.2.0+1 [meta path process]
- xml 5.4.1 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]
Device
iphone 12
OS
ios 13
Deployment Method
Amplify CLI
CLI Version
10.0.0
Additional Context
No response
Amplify Config
N.A
Hello @skim037 - Can you let me know what type tableThreeRepo/tableFourRepo is, and/or the code for the save method on these types?
The table is really simple.
type AppBadgeCount @model @auth(rules: [{allow: public}]) {
id: ID!
profile_id: ID! @primaryKey
count: Int
}
Future<void> save(AppBadgeCount appBadgeCount) async {
await Amplify.DataStore.save(appBadgeCount);
}
I tried two thing. First, I moved the call to save appBadgeCount to the start of the method (before series of other save operations), and it was saved properly. Second, I tried without the primaryKey annotation (save operation happens after series of other save operations), and it also worked properly. But when the table has primaryKey annotation and save call happens after series of other save calls in the same function, it fails to save a record to the table.
Another call that fails to sync to the backend is updating a profile table. A profile record was created properly from another method, and when I try to updated it, it doesn't work. Below is a record that was created by other calls. It was created and updated properly. But when I tried to update it after series of other writes in the same function, update request doesn't get synced to the backend (no exception is thrown).
{
"id": {
"S": "84ec0f9e-c6b7-4446-9cdf-24dec57228ea"
},
"birthday": {
"S": "2000-01-01"
},
"createdAt": {
"S": "2022-09-24T01:18:19.179Z"
},
"email": {
"S": "[email protected]"
},
"gender": {
"S": "MAN"
},
"introduction": {
"S": "hi"
},
"profileBasicInfoId": {
"S": "861117e7-5052-4cba-9311-0a9b1b0ae8b8"
},
"profileUsernameId": {
"S": "d136aff5-bbf7-462a-ae81-88cbea6d45b6"
},
"profile_username": {
"S": "aaaa"
},
"school": {
"S": "school"
},
"updatedAt": {
"S": "2022-09-24T01:18:33.714Z"
},
"userID": {
"S": "377314b3-d9e0-4474-bd6d-915b6b2ec5c8"
},
"work": {
"S": "work"
},
"_lastChangedAt": {
"N": "1663982313766"
},
"_version": {
"N": "2"
},
"__typename": {
"S": "Profile"
}
}
Profile table
type Profile @model @auth(rules: [{allow: public}]) {
id: ID!
profile_username: String! @index(name: "byUsername", queryField: "byUsername")
email: String! @index(name: "byEmail")
birthday: AWSDate
gender: GenderType
introduction: String
school: String
work: String
profile_status: ProfileStatus @index(name: "byProfileStatus")
main_photo: String
userID: ID! @index(name: "byUserID")
basicInfo : BasicInfo @hasOne
moreInfo : MoreInfo @hasOne
username: Username @hasOne
profile_interests: [ProfileInterest] @hasMany
verification: Verification @hasOne
searchableProperties: SearchableProperties @hasOne
filter: Filter @hasOne
advancedFilter: AdvancedFilter @hasOne
}
//Call to update the profile table.
Profile updatedProfile = sessionBloc.profile!.copyWith(
profile_status: ProfileStatus.STANDARD,
profileMoreInfoId: moreInfo.id,
profileVerificationId: verification.id,
profileFilterId: filter.id,
profileAdvancedFilterId: advancedFilter.id,
moreInfo: moreInfo,
verification: verification,
filter: filter,
advancedFilter: advancedFilter,
);
await profileRepo.save(updatedProfile);
And as I mentioned earlier, these calls succeeds when I add a breakpoint and execute line by line.
I tried running it from Xcode. And I see a log saying model is saved successfully.
Successfully saved model: FlutterSerializedModel(values: ["profile_username": Amplify.JSONValue.string("aaaa"), "profileSearchablePropertiesId": Amplify.JSONValue.null, "createdAt": Amplify.JSONValue.null, "profileFilterId": Amplify.JSONValue.null, "profile_status": Amplify.JSONValue.string("STANDARD"), "profileMoreInfoId": Amplify.JSONValue.null, "profileUsernameId": Amplify.JSONValue.string("d136aff5-bbf7-462a-ae81-88cbea6d45b6"), "birthday": Amplify.JSONValue.string("2000-01-01"), "id": Amplify.JSONValue.string("84ec0f9e-c6b7-4446-9cdf-24dec57228ea"), "profileAdvancedFilterId": Amplify.JSONValue.null, "main_photo": Amplify.JSONValue.null, "profileBasicInfoId": Amplify.JSONValue.string("861117e7-5052-4cba-9311-0a9b1b0ae8b8"), "updatedAt": Amplify.JSONValue.null, "school": Amplify.JSONValue.string("school"), "introduction": Amplify.JSONValue.string("hi"), "userID": Amplify.JSONValue.string("377314b3-d9e0-4474-bd6d-915b6b2ec5c8"), "email": Amplify.JSONValue.string("[email protected]"), "gender": Amplify.JSONValue.string("MAN"), "profileAppBadgeCountId": Amplify.JSONValue.null, "__typename": Amplify.JSONValue.string("Profile"), "profileVerificationId": Amplify.JSONValue.null, "work": Amplify.JSONValue.string("work")], _modelName: "Profile")
However, I do not see new property "profile_status: STANDARD" in DDB.
I have another datapoint that might be useful. I hope you can reproduce this and see what's going on.
I created three new tables.
type TestTableOne @model @auth(rules: [{allow: public}]) {
id: ID!
profile_id: ID! @primaryKey
count: Int
}
type TestTableTwo @model @auth(rules: [{allow: public}]) {
id: ID!
profile_id: ID! @primaryKey
count: Int
}
type TestTableThree @model @auth(rules: [{allow: public}]) {
id: ID!
profile_id: ID! @primaryKey
count: Int
}
Then I execute save operation with the same profile Id.
final profileId = UUID.getUUID();
final testTableOne = TestTableOne(profile_id: profileId, count: 100);
await appBadgeCountRepo.saveTestOne(testTableOne);
final testTableTwo = TestTableTwo(profile_id: profileId, count: 100);
await appBadgeCountRepo.saveTestTwo(testTableTwo);
final testTableThree = TestTableThree(profile_id: profileId, count: 100);
await appBadgeCountRepo.saveTestThree(testTableThree);
I checked DDB table, and I see this record in table one and two, but not in table three. I think the order matters here. For example, if I execute two, three and one, table two and three has a record but one doesn't.
I believe this test demonstrates the issue I'm currently facing. Please let me know if I'm doing something wrong here. Thanks.
The table is really simple.
Hi @skim037 - I am actually looking for the code for tableThreeRepo and tableFourRepo. It is not clear to me why you are calling save on the same model twice. If I can see the code for that save method, it may make more sense.
save operations all look like this.
Future<void> saveTestOne(TestTableOne testTableOne) async {
await Amplify.DataStore.save(testTableOne);
}
Future<void> saveTestTableTwo(TestTableTwo testTableTwo) async {
await Amplify.DataStore.save(testTableTwo);
}
Future<void> saveTestThree(TestTableThree testTableThree) async {
await Amplify.DataStore.save(testTableThree);
}
It seems like the issue happens when there is a series of writes (different models) that uses same custom primary key which was the point I was trying to get across with the previous comment.
Your original code snippet included saving the same model twice. infoThree was passed into tableThreeRepo.save and tableFourRepo.save. Was that intentional? If so, what is the use case for saving the same model twice in a row?
await tableThreeRepo.save(infoThree);
.
.
await tableFourRepo.save(infoThree);
No it's by mistake. They should be different model. Please disregard my original code snippet and look at the my latest replies.
Hi @skim037 in your code it looks like you're using the same id: "profileId" to save 3 different items. Can you try giving a different id for each testTable you create?
final profileId = UUID.getUUID();
final testTableOne = TestTableOne(profile_id: profileId, count: 100);
await appBadgeCountRepo.saveTestOne(testTableOne);
final testTableTwo = TestTableTwo(profile_id: profileId, count: 100);
await appBadgeCountRepo.saveTestTwo(testTableTwo);
final testTableThree = TestTableThree(profile_id: profileId, count: 100);
await appBadgeCountRepo.saveTestThree(testTableThree);
final profileIdOne = UUID.getUUID();
final profileIdTwo = UUID.getUUID();
final profileIdThree = UUID.getUUID();
final testTableOne = TestTableOne(profile_id: profileIdOne, count: 106);
await appBadgeCountRepo.saveTestOne(testTableOne);
final testTableTwo = TestTableTwo(profile_id: profileIdTwo, count: 106);
await appBadgeCountRepo.saveTestTwo(testTableTwo);
final testTableThree = TestTableThree(profile_id: profileIdThree, count: 106);
await appBadgeCountRepo.saveTestThree(testTableThree);
Above code works as expected. I see new records in all three tables. But this is not what I want. I'm using profieId as a custom primary key and I'm trying to save records with a same profile Id.
And as I mentioned earlier, using a same profile Id works if I add a breakpoint and step through the code line by line.
This should be pretty easy to try to reproduce. Are you not seeing the same behavior?
Hi @skim037 - I was not able to reproduce this by saving many updates to the same model in succession. Below is the code I am using to attempt a reproduction. If you are still experiencing this, could you provide a minimal reproduction of the issue (similar to the snippet below) so that we can reproduce this?
final blog = Blog(name: 'My blog 123');
await Amplify.DataStore.save(blog);
await Amplify.DataStore.save(
blog.copyWith(name: 'My blog 1234'),
);
await Amplify.DataStore.save(
blog.copyWith(name: 'My blog 1235'),
);
await Amplify.DataStore.save(
blog.copyWith(name: 'My blog 1236'),
);
await Amplify.DataStore.save(
blog.copyWith(name: 'My blog 1237'),
);
await Amplify.DataStore.save(
blog.copyWith(name: 'My blog 1238'),
);
@skim037 - I am going to close this out since we have not heard back. If you are still experiencing an issue, please open a new issue and include a sample reproduction as I was not able to reproduce this. Thanks.
@Jordan-Nelson I wonder what your Blog model looks like. I'm not just saying that the series of writes are failing. What I'm saying is that series of write fails when I use custom primary key. I will give this another try and reopen the issue if I still run into this issue