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

Fixed faulty transaction bug #6508

Merged
merged 22 commits into from
Aug 15, 2022
Merged

Fixed faulty transaction bug #6508

merged 22 commits into from
Aug 15, 2022

Conversation

maneesht
Copy link
Contributor

@maneesht maneesht commented Aug 4, 2022

Fixed issue where transaction callbacks were given inaccurate data when concurrent writes occur.

Bug first introduced here.

@changeset-bot
Copy link

changeset-bot bot commented Aug 4, 2022

🦋 Changeset detected

Latest commit: 2308022

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/database-compat Patch
@firebase/database Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 4, 2022

Size Report 1

Affected Products

  • @firebase/database

    TypeBase (2b2079d)Merge (7efa28d)Diff
    browser248 kB248 kB-5 B (-0.0%)
    esm5276 kB276 kB-5 B (-0.0%)
    main281 kB281 kB-5 B (-0.0%)
    module248 kB248 kB-5 B (-0.0%)
  • @firebase/database-compat/standalone

    TypeBase (2b2079d)Merge (7efa28d)Diff
    main370 kB370 kB-5 B (-0.0%)
  • bundle

    TypeBase (2b2079d)Merge (7efa28d)Diff
    database (Append to a list of data)145 kB145 kB-5 B (-0.0%)
    database (Filtering data)144 kB144 kB-5 B (-0.0%)
    database (Listen for child events)160 kB160 kB-5 B (-0.0%)
    database (Listen for value events + Detach listeners)160 kB160 kB-5 B (-0.0%)
    database (Listen for value events)160 kB160 kB-5 B (-0.0%)
    database (Read data once)159 kB159 kB-5 B (-0.0%)
    database (Save data as transactions)162 kB162 kB-5 B (-0.0%)
    database (Sort data)145 kB145 kB-5 B (-0.0%)
    database (Write data)144 kB144 kB-5 B (-0.0%)
  • firebase

    TypeBase (2b2079d)Merge (7efa28d)Diff
    firebase-compat.js794 kB794 kB-2 B (-0.0%)
    firebase-database-compat.js166 kB166 kB-2 B (-0.0%)
    firebase-database.js153 kB153 kB-2 B (-0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 4, 2022

Size Analysis Report 1

Affected Products

  • @firebase/database

    • DataSnapshot

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps138 kB138 kB-5 B (-0.0%)
    • Database

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps136 kB136 kB-5 B (-0.0%)
    • OnDisconnect

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size119 kB119 kB-5 B (-0.0%)
      size-with-ext-deps140 kB140 kB-5 B (-0.0%)
    • QueryConstraint

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • TransactionResult

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • _QueryImpl

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps136 kB136 kB-5 B (-0.0%)
    • _QueryParams

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps136 kB136 kB-5 B (-0.0%)
    • _ReferenceImpl

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps136 kB136 kB-5 B (-0.0%)
    • _TEST_ACCESS_forceRestClient

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • _TEST_ACCESS_hijackHash

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • _repoManagerDatabaseFromApp

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • _setSDKVersion

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps136 kB136 kB-5 B (-0.0%)
    • _validatePathString

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • _validateWritablePath

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • child

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • connectDatabaseEmulator

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps138 kB138 kB-5 B (-0.0%)
    • enableLogging

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • endAt

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size118 kB118 kB-5 B (-0.0%)
      size-with-ext-deps139 kB139 kB-5 B (-0.0%)
    • endBefore

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size118 kB118 kB-5 B (-0.0%)
      size-with-ext-deps140 kB140 kB-5 B (-0.0%)
    • equalTo

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size119 kB119 kB-5 B (-0.0%)
      size-with-ext-deps140 kB140 kB-5 B (-0.0%)
    • forceLongPolling

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • forceWebSockets

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • get

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size132 kB132 kB-5 B (-0.0%)
      size-with-ext-deps153 kB153 kB-5 B (-0.0%)
    • getDatabase

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • goOffline

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • goOnline

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • increment

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • limitToFirst

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • limitToLast

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • off

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size124 kB124 kB-5 B (-0.0%)
      size-with-ext-deps145 kB145 kB-5 B (-0.0%)
    • onChildAdded

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size132 kB132 kB-5 B (-0.0%)
      size-with-ext-deps153 kB153 kB-5 B (-0.0%)
    • onChildChanged

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size132 kB132 kB-5 B (-0.0%)
      size-with-ext-deps153 kB153 kB-5 B (-0.0%)
    • onChildMoved

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size132 kB132 kB-5 B (-0.0%)
      size-with-ext-deps153 kB153 kB-5 B (-0.0%)
    • onChildRemoved

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size132 kB132 kB-5 B (-0.0%)
      size-with-ext-deps153 kB153 kB-5 B (-0.0%)
    • onDisconnect

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size119 kB119 kB-5 B (-0.0%)
      size-with-ext-deps141 kB141 kB-5 B (-0.0%)
    • onValue

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size132 kB132 kB-5 B (-0.0%)
      size-with-ext-deps153 kB153 kB-5 B (-0.0%)
    • orderByChild

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size118 kB118 kB-5 B (-0.0%)
      size-with-ext-deps139 kB139 kB-5 B (-0.0%)
    • orderByKey

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size117 kB117 kB-5 B (-0.0%)
      size-with-ext-deps138 kB138 kB-5 B (-0.0%)
    • orderByPriority

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size117 kB117 kB-5 B (-0.0%)
      size-with-ext-deps138 kB138 kB-5 B (-0.0%)
    • orderByValue

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size117 kB117 kB-5 B (-0.0%)
      size-with-ext-deps138 kB138 kB-5 B (-0.0%)
    • push

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size117 kB117 kB-5 B (-0.0%)
      size-with-ext-deps139 kB139 kB-5 B (-0.0%)
    • query

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • ref

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • refFromURL

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • remove

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • runTransaction

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size134 kB134 kB-5 B (-0.0%)
      size-with-ext-deps155 kB155 kB-5 B (-0.0%)
    • serverTimestamp

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size115 kB115 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • set

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size116 kB116 kB-5 B (-0.0%)
      size-with-ext-deps137 kB137 kB-5 B (-0.0%)
    • setPriority

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size117 kB117 kB-5 B (-0.0%)
      size-with-ext-deps138 kB138 kB-5 B (-0.0%)
    • setWithPriority

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size117 kB117 kB-5 B (-0.0%)
      size-with-ext-deps138 kB138 kB-5 B (-0.0%)
    • startAfter

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size118 kB118 kB-5 B (-0.0%)
      size-with-ext-deps140 kB140 kB-5 B (-0.0%)
    • startAt

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size118 kB118 kB-5 B (-0.0%)
      size-with-ext-deps139 kB139 kB-5 B (-0.0%)
    • update

      Size

      TypeBase (2b2079d)Merge (7efa28d)Diff
      size118 kB118 kB-5 B (-0.0%)
      size-with-ext-deps139 kB139 kB-5 B (-0.0%)

Test Logs

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2022

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@maneesht maneesht marked this pull request as ready for review August 12, 2022 22:30
Copy link
Contributor

@jmwski jmwski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you drop a reference to when this broken behavior was introduced in the PR description?

@jmwski jmwski assigned maneesht and unassigned jmwski Aug 15, 2022
@maneesht maneesht assigned jmwski and unassigned maneesht Aug 15, 2022
README.md Outdated Show resolved Hide resolved
.changeset/warm-pillows-know.md Outdated Show resolved Hide resolved
@maneesht maneesht merged commit fcd4b8a into master Aug 15, 2022
@maneesht maneesht deleted the mtewani/fix-transactions branch August 15, 2022 22:16
@google-oss-bot google-oss-bot mentioned this pull request Aug 16, 2022
@firebase firebase locked and limited conversation to collaborators Sep 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants