forked from distributed-system-analysis/pbench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid Sync message overflow (distributed-system-analysis#3389)
PBENCH-1120 A SQL error was observed in deployment where `pbench-index` logged an error on the `INDEX` sync object because a tarball was somehow not present. The message string generated by `indexing_tarballs.py` exceeded the `VARCHAR(255)` column specification. This isn't an attempt to address the root problem, but to address the symptom of overloading the operation table message column in the future so at least errors are properly recorded. This reworks some of the `indexing_tarballs.py` messages to avoid redundancy (e.g., naming the dataset or tarball isn't necessary as the records are linked to the `Dataset`), but also removes the limit on the message column as a precaution.
- Loading branch information
Showing
5 changed files
with
71 additions
and
8 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
lib/pbench/server/database/alembic/versions/5679217a62bb_sync_message.py
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""Remove size limit on Sync messages | ||
Revision ID: 5679217a62bb | ||
Revises: 80c8c690f09b | ||
Create Date: 2023-04-18 20:03:26.080554 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "5679217a62bb" | ||
down_revision = "80c8c690f09b" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.alter_column( | ||
"dataset_operations", | ||
"message", | ||
existing_type=sa.VARCHAR(length=255), | ||
type_=sa.Text(), | ||
existing_nullable=True, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
op.alter_column( | ||
"dataset_operations", | ||
"message", | ||
existing_type=sa.Text(), | ||
type_=sa.VARCHAR(length=255), | ||
existing_nullable=True, | ||
) | ||
# ### end Alembic commands ### |
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
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