-
Notifications
You must be signed in to change notification settings - Fork 6
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
Mecanismo de timeout y retries en los envios a IOTAs #85
Merged
Merged
Changes from all commits
Commits
Show all changes
5 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
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
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
Oops, something went wrong.
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.
Veo que se ha hecho una definición de parámetro análoga a la del CB, con el mismo nombre y descripción de parámetros. ¡Bien! :)
Sin embargo, hay una diferencia. Aquí se usa un default: 20 para post_retry_backoff_factor, mientras que en el CB se usa 0 (que entiendo es no aplicar espera alguna).
Igual deberiamos dejarlo también a 0, por homogeneidad. O lo contrario... cambiar en el CB para que esté a 20 y también sea homogeneo así (es un ligero cambio en la compatibilidad hacia atrás, pero asumible).
@arcosa ¿tú que opinas? ¿Por qué cuando implementamos esto para el CB se eligió 0 como default?
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.
Hola, me parece que en el cb el
post_retry_backoff_factor
es por defecto 20, pero en el README.md puede que esté mal documentado.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.
Si, es curioso, no sabía que CB tb usaba esa variable (o similar).. mi yo del pasado escogió ese valor, pensando en que es un factor "multiplicador" que incrementa el tiempo entre reintentos. Si le pones 0.. implica que los reintentos se hacen en el momento. Si hay problemas de conectividad puntuales (porque cae un servicio, se está reiniciando, algún miniproblema de red, etc..) si lanzas 3 reintentos sin espacio entre ellos.. lo probable es que fallen los 3... con factor 20, creo que empezaba reintantdo con unos segundos y los últimos reintentos tardaba algún minuto.. si pasado unos minutos, sigue dando el problema de conectividad, entonces ya desiste. Todo esto pensando en el contexto de envío de datos en batch al Context Broker con ETLs que pueden esperar un poco, antes de que pete la ETL por no poder enviar los datos.
Estaba revisando que en la doc oficial, el backoff está deshabilitado (factor set to 0). Y si el CB tb lo usa y por defecto es cero.. se podría asumir ponerlo aquí a cero. De hecho mirando la doc oficial https://pypi.org/project/tc-etl-lib/ sale como si por defecto estuviera a 0, pero en código lo tenemos a 20.
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.
Si en el código está a 20, entonces simplemente hay que corregirlo en la parte de docu del CB y ya estaría. @CeciliaFili puedes incluirlo en esta PR, pls?
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.
claro!
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.
@fgalan Hecho