Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimistic Concurrency Pt.1 #834

Merged
merged 124 commits into from
Sep 28, 2024
Merged

Optimistic Concurrency Pt.1 #834

merged 124 commits into from
Sep 28, 2024

Conversation

FoseFx
Copy link
Member

@FoseFx FoseFx commented Sep 17, 2024

First Steps for #808

  • Return Consistency Token
    • CreatePropertyResponse
    • GetPropertyResponse
    • GetPropertiesBySubjectTypeResponse
    • GetAttachedPropertyValuesResponse
    • GetBedResponse
    • GetBedByPatientResponse
    • GetBedsResponse
    • GetBedsByRoomResponse
    • GetPatientResponse
    • GetPatientByBedResponse
    • GetPatientsByWardResponse
    • GetPatientAssignmentByWardResponse
    • GetPatientDetailsResponse
    • GetPatientListResponse
    • GetRecentPatientsResponse
    • GetRoomResponse
    • GetRoomsResponse
    • GetRoomOverviewsByWardResponse
    • GetTaskResponse
    • GetTasksByPatientResponse
    • GetTasksByPatientSortedByStatusResponse
    • GetAssignedTasksResponse
    • GetAllTaskTemplatesResponse
    • GetWardResponse
    • GetWardsResponse
    • GetRecentWardsResponse
    • GetWardDetailsResponse
    • GetWardOverviewsResponse
    • CreateBedRequest
    • BulkCreateBedsResponse (not implemented?)
    • CreatePatientRequest
    • CreateRoomResponse
    • CreateTaskRequest
    • CreateSubtaskResponse
    • CreateTaskTemplateResponse
    • CreateTaskTemplateSubTaskResponse
    • UpdatePropertyResponse
    • AttachPropertyValueResponse
    • UpdateBedResponse
    • UpdatePatientResponse
    • AssignBedResponse
    • UnassignBedResponse
    • DischargePatientResponse
    • ReadmitPatientResponse
    • UpdateRoomResponse
    • UpdateTaskRequest
    • AssignTaskResponse
    • UnassignTaskResponse
    • UpdateSubtaskResponse
    • RemoveTaskDueDateResponse
    • UpdateTaskTemplateResponse
    • UpdateTaskTemplateSubTaskResponse
  • Make sure all projections update the consistency
    • ward_repo.sql
    • bed_repo.sql
    • task_repo.sql
    • room_repo.sql
    • task_template_repo.sql
    • patient_repo.sql
    • property_repo.sql
    • property_value

@FoseFx FoseFx self-assigned this Sep 17, 2024
Copy link
Member

@MaxSchaefer MaxSchaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review still in progress. 162 of 261 files.

libs/hwes/aggregate_store.go Outdated Show resolved Hide resolved
libs/hwes/eventstoredb/aggregate_store.go Outdated Show resolved Hide resolved
libs/hwtesting/containers.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/TaskTemplateCRUD_test.go Outdated Show resolved Hide resolved
Copy link
Member

@MaxSchaefer MaxSchaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in scope of this pr but whats your opinion about an own type definition for the consistency tokens instead of uint64?

services/tasks-svc/stories/RoomCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/RoomCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/RoomCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/RoomCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/TaskCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/WardCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/WardCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/WardCRUD_test.go Outdated Show resolved Hide resolved
services/tasks-svc/stories/WardCRUD_test.go Outdated Show resolved Hide resolved
@MaxSchaefer
Copy link
Member

261/261

Copy link
Member

@MaxSchaefer MaxSchaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All touched Proto definitions needs to be backwards compatible. Many Proto changes of this PR are introducing a non-optional param "consistency". This param needs to be optional.

Examples

@FoseFx
Copy link
Member Author

FoseFx commented Sep 28, 2024

All touched Proto definitions needs to be backwards compatible. Many Proto changes of this PR are introducing a non-optional param "consistency". This param needs to be optional.

Examples

I just went through all message changes again, requests only got new optional fields. Responses got new mandatory strings, because the backend must provide them. (Clients are free to ignore it though)

@FoseFx
Copy link
Member Author

FoseFx commented Sep 28, 2024

Not in scope of this pr but whats your opinion about an own type definition for the consistency tokens instead of uint64?

Very much in scope, and a very good idea!

@FoseFx FoseFx requested a review from MaxSchaefer September 28, 2024 07:55
Copy link
Member

@MaxSchaefer MaxSchaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stay consistent 🤟

@FoseFx FoseFx merged commit dcc524f into main Sep 28, 2024
45 checks passed
@FoseFx FoseFx deleted the issue/808-optimistic branch October 20, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants