-
Notifications
You must be signed in to change notification settings - Fork 133
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
Active Record Multiple Database > Caveats #697
Open
rohan-techfreak
wants to merge
3
commits into
campuscode:main
Choose a base branch
from
rohan-techfreak:topic-696
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -365,27 +365,26 @@ connections globally. | |||||||||||||
|
||||||||||||||
## Caveats | ||||||||||||||
|
||||||||||||||
### Automatic swapping for horizontal sharding | ||||||||||||||
### Troca automática para fragmentação horizontal | ||||||||||||||
|
||||||||||||||
While Rails now supports an API for connecting to and swapping connections of shards, it does | ||||||||||||||
not yet support an automatic swapping strategy. Any shard swapping will need to be done manually | ||||||||||||||
in your app via a middleware or `around_action`. | ||||||||||||||
Embora o Rails agora suporte uma API para conectar e trocar conexões de _shards_, ele faz | ||||||||||||||
ainda não suporta uma estratégia de troca automática. Qualquer troca de fragmentos precisará ser feita manualmente em sua aplicação por meio de um _middleware_ ou `around_action`. | ||||||||||||||
|
||||||||||||||
### Load Balancing Replicas | ||||||||||||||
### Réplicas de balanceamento de carga | ||||||||||||||
|
||||||||||||||
Rails also doesn't support automatic load balancing of replicas. This is very | ||||||||||||||
dependent on your infrastructure. We may implement basic, primitive load balancing | ||||||||||||||
in the future, but for an application at scale this should be something your application | ||||||||||||||
handles outside of Rails. | ||||||||||||||
O Rails também não suporta balanceamento de carga automático de réplicas. Isto é muito | ||||||||||||||
dependente de sua infraestrutura. Podemos implementar balanceamento de carga básico e primitivo | ||||||||||||||
no futuro, mas para uma aplicação em escala, isso deve ser algo que sua aplicação | ||||||||||||||
lida fora do Rails. | ||||||||||||||
|
||||||||||||||
### Joining Across Databases | ||||||||||||||
### Join entre Bancos de Dados | ||||||||||||||
|
||||||||||||||
Applications cannot join across databases. At the moment applications will need to | ||||||||||||||
manually write two selects and split the joins themselves. In a future version Rails | ||||||||||||||
will split the joins for you. | ||||||||||||||
As aplicações não podem fazer `join` entre bancos de dados. No momento, as aplicações precisarão | ||||||||||||||
escrever manualmente dois *selects* e dividir as próprias *joins*. Em uma versão futura do Rails | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
irá dividir as junções para você. | ||||||||||||||
|
||||||||||||||
### Schema Cache | ||||||||||||||
### Cache de Esquema | ||||||||||||||
|
||||||||||||||
If you use a schema cache and multiple databases you'll need to write an initializer | ||||||||||||||
that loads the schema cache from your app. This wasn't an issue we could resolve in | ||||||||||||||
time for Rails 6.0 but hope to have it in a future version soon. | ||||||||||||||
Se você usar um *cache* de esquema (*scheme*) e vários bancos de dados, você precisará escrever um inicializador | ||||||||||||||
que carrega o *cache* de esquema da sua aplicação. Não era um problema que pudéssemos resolver em | ||||||||||||||
tempo para Rails 6.0, mas espero tê-lo em uma versão futura em breve. | ||||||||||||||
Comment on lines
+388
to
+390
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.