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

[WIP] Read-only Replica #879

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

[WIP] Read-only Replica #879

wants to merge 1 commit into from

Conversation

alexanderkiel
Copy link
Member

Prepare Transaction Log API to Transport Resources

Before that change the transaction log API handled only resource hashes instead of whole resources. The resources itself had to be handled outside of the transaction log.

Now the API of the transaction log takes resources instead of hashes. Internally the local and the Kafka implementation still use the resource store in order to transport the resources out-of-band so that the transaction log storage itself doesn't have to contain the whole resources.

This change enables transaction log implementations that transport the resources in-band and so don't need a resource store. At least not for the resources that are not already indexed.

This change is fully compatible with the current storage model and so is a pure refactoring.

@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Merging #879 (be4eacc) into develop (6ceb05e) will increase coverage by 0.00%.
The diff coverage is 98.49%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #879   +/-   ##
========================================
  Coverage    94.02%   94.03%           
========================================
  Files          235      234    -1     
  Lines        14763    14783   +20     
  Branches       378      378           
========================================
+ Hits         13881    13901   +20     
  Misses         504      504           
  Partials       378      378           
Impacted Files Coverage Δ
...ules/db-tx-log-kafka/src/blaze/db/tx_log/kafka.clj 98.94% <97.29%> (-1.06%) ⬇️
modules/db/src/blaze/db/tx_log/local.clj 98.05% <98.03%> (-0.56%) ⬇️
...db-tx-log-kafka/src/blaze/db/tx_log/kafka/util.clj 100.00% <100.00%> (ø)
modules/db-tx-log/src/blaze/db/tx_log.clj 100.00% <100.00%> (ø)
modules/db/src/blaze/db/node.clj 97.62% <100.00%> (-0.02%) ⬇️
modules/db/src/blaze/db/node/resource_indexer.clj 96.55% <100.00%> (+0.94%) ⬆️
modules/db/src/blaze/db/node/transaction.clj 100.00% <100.00%> (ø)
...db-tx-log-kafka/src/blaze/db/tx_log/kafka/spec.clj
...odules/fhir-structure/src/blaze/fhir/spec/type.clj 86.27% <0.00%> (+0.15%) ⬆️

Before that change the transaction log API handled only resource hashes
instead of whole resources. The resources itself had to be handled
outside of the transaction log.

Now the API of the transaction log takes resources instead of hashes.
Internally the local and the Kafka implementation still use the
resource store in order to transport the resources out-of-band so that
the transaction log storage itself doesn't have to contain the whole
resources.

This change enables transaction log implementations that transport the
resources in-band and so don't need a resource store. At least not for
the resources that are not already indexed.

This change is fully compatible with the current storage model and so is
a pure refactoring.
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.

None yet

1 participant