Skip to content

Adding IF NOT EXISTS to CREATE log_event_dropped #3304

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

Merged
merged 2 commits into from
Jan 13, 2022
Merged

Adding IF NOT EXISTS to CREATE log_event_dropped #3304

merged 2 commits into from
Jan 13, 2022

Conversation

argzdev
Copy link
Contributor

@argzdev argzdev commented Jan 11, 2022

Proposed fix for #3301.

The log_event_dropped table was initially added on SchemaManager.java on

  • Firebase Crashlytics 18.2.4
  • datatransport:transport-runtime:3.1.0

EDIT: Proposed solution by mkocus is to use DROP TABLE IF EXISTS before the CREATE TABLE is called.

The DROP_LOG_EVENT_DROPPED_SQL is only called during onDowngrade, which means if somehow the migration fails half way, there is no way of continuing the migration, thus it's best to call DROP_LOG_EVENT_DROPPED_SQL whenever creating the table to ensure this table does not exist before upgrade.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 11, 2022

Size Report 1

Affected Products

  • transport-runtime

    TypeBase (e01e144)Merge (87537ab)Diff
    aar178 kB178 kB+15 B (+0.0%)
    apk (aggressive)43.8 kB43.8 kB+20 B (+0.0%)
    apk (release)82.6 kB82.6 kB-8 B (-0.0%)

Test Logs

Notes

  • Commit (87537ab) is created by Prow via merging PR base commit (e01e144) and head commit (0fdc187).

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/fyiD80ujLQ.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 11, 2022

Coverage Report 1

Affected Products

  • transport-runtime

    Overall coverage changed from ? (e01e144) to 55.42% (87537ab) by ?.

    92 individual files with coverage change

    FilenameBase (e01e144)Merge (87537ab)Diff
    AlarmManagerScheduler.java?91.89%?
    AlarmManagerSchedulerBroadcastReceiver.java?6.25%?
    AutoProtoEncoderDoNotUseEncoder.java?84.47%?
    AutoValue_BackendRequest.java?60.00%?
    AutoValue_BackendResponse.java?31.82%?
    AutoValue_CreationContext.java?55.26%?
    AutoValue_EventInternal.java?65.82%?
    AutoValue_EventStoreConfig.java?56.06%?
    AutoValue_PersistedEvent.java?55.17%?
    AutoValue_SchedulerConfig.java?33.33%?
    AutoValue_SchedulerConfig_ConfigValue.java?53.19%?
    AutoValue_SendRequest.java?63.38%?
    AutoValue_TransportContext.java?86.36%?
    BackendFactory.java?0.00%?
    BackendRegistry.java?0.00%?
    BackendRegistryModule.java?0.00%?
    BackendRequest.java?100.00%?
    BackendResponse.java?100.00%?
    ClientHealthMetricsStore.java?0.00%?
    ClientMetrics.java?57.14%?
    Clock.java?0.00%?
    CreationContext.java?66.67%?
    CreationContextFactory.java?100.00%?
    CreationContextFactory_Factory.java?0.00%?
    DaggerTransportRuntimeComponent.java?0.00%?
    DefaultScheduler.java?80.00%?
    DefaultScheduler_Factory.java?0.00%?
    Destination.java?0.00%?
    EncodedDestination.java?0.00%?
    EncodedPayload.java?61.90%?
    EventInternal.java?53.85%?
    EventStore.java?0.00%?
    EventStoreConfig.java?100.00%?
    EventStoreModule.java?0.00%?
    EventStoreModule_DbNameFactory.java?0.00%?
    EventStoreModule_PackageNameFactory.java?0.00%?
    EventStoreModule_SchemaVersionFactory.java?0.00%?
    EventStoreModule_StoreConfigFactory.java?0.00%?
    ExecutionModule.java?0.00%?
    ExecutionModule_ExecutorFactory.java?0.00%?
    Function.java?0.00%?
    GlobalMetrics.java?0.00%?
    JobInfoScheduler.java?95.83%?
    JobInfoSchedulerService.java?0.00%?
    LogEventDropped.java?40.00%?
    Logging.java?46.67%?
    LogSourceMetrics.java?0.00%?
    MetadataBackendRegistry.java?66.67%?
    MetadataBackendRegistry_Factory.java?0.00%?
    Monotonic.java?0.00%?
    PersistedEvent.java?100.00%?
    PriorityMapping.java?88.89%?
    ProtoEncoderDoNotUse.java?50.00%?
    Retries.java?0.00%?
    RetryStrategy.java?0.00%?
    SafeLoggingExecutor.java?84.62%?
    Scheduler.java?0.00%?
    SchedulerConfig.java?98.46%?
    SchedulingConfigModule.java?0.00%?
    SchedulingConfigModule_ConfigFactory.java?0.00%?
    SchedulingModule.java?0.00%?
    SchedulingModule_WorkSchedulerFactory.java?0.00%?
    SchemaManager.java?98.48%?
    SchemaManager_Factory.java?0.00%?
    SendRequest.java?100.00%?
    SQLiteEventStore.java?36.98%?
    SQLiteEventStore_Factory.java?0.00%?
    StorageMetrics.java?0.00%?
    SynchronizationException.java?0.00%?
    SynchronizationGuard.java?0.00%?
    TestClock.java?40.00%?
    TimeModule.java?0.00%?
    TimeModule_EventClockFactory.java?0.00%?
    TimeModule_UptimeClockFactory.java?0.00%?
    TimeWindow.java?0.00%?
    TransportBackend.java?0.00%?
    TransportBackendDiscovery.java?0.00%?
    TransportContext.java?100.00%?
    TransportFactoryImpl.java?100.00%?
    TransportImpl.java?88.89%?
    TransportInternal.java?0.00%?
    TransportRuntime.java?59.26%?
    TransportRuntimeComponent.java?0.00%?
    TransportRuntime_Factory.java?0.00%?
    Uploader.java?94.95%?
    Uploader_Factory.java?0.00%?
    UptimeClock.java?100.00%?
    WallTime.java?0.00%?
    WallTimeClock.java?0.00%?
    WorkInitializer.java?0.00%?
    WorkInitializer_Factory.java?0.00%?
    WorkScheduler.java?0.00%?

Test Logs

Notes

  • Commit (87537ab) is created by Prow via merging PR base commit (e01e144) and head commit (0fdc187).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/w7YPOPBqVy.html

@google-oss-bot
Copy link
Contributor

@argzdev: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
device-check-changed 0fdc187 link /test device-check-changed

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@davidmotson davidmotson merged commit 46b3dfd into firebase:master Jan 13, 2022
@argzdev argzdev deleted the issue_3301_create_db_error branch January 14, 2022 09:06
@firebase firebase locked and limited conversation to collaborators Feb 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants