@@ -325,7 +325,7 @@ export class IndexedDbPersistence implements Persistence {
325
325
this . scheduleClientMetadataAndPrimaryLeaseRefreshes ( ) ;
326
326
327
327
return this . simpleDb . runTransaction (
328
- 'readonly-idempotent ' ,
328
+ 'readonly' ,
329
329
[ DbTargetGlobal . store ] ,
330
330
txn => getHighestListenSequenceNumber ( txn )
331
331
) ;
@@ -388,7 +388,7 @@ export class IndexedDbPersistence implements Persistence {
388
388
*/
389
389
private updateClientMetadataAndTryBecomePrimary ( ) : Promise < void > {
390
390
return this . simpleDb
391
- . runTransaction ( 'readwrite-idempotent ' , ALL_STORES , txn => {
391
+ . runTransaction ( 'readwrite' , ALL_STORES , txn => {
392
392
const metadataStore = clientMetadataStore ( txn ) ;
393
393
return metadataStore
394
394
. put (
@@ -474,7 +474,7 @@ export class IndexedDbPersistence implements Persistence {
474
474
475
475
const inactiveClients = await this . runTransaction (
476
476
'maybeGarbageCollectMultiClientState' ,
477
- 'readwrite-primary-idempotent ' ,
477
+ 'readwrite-primary' ,
478
478
txn => {
479
479
const metadataStore = IndexedDbPersistence . getStore <
480
480
DbClientMetadataKey ,
@@ -658,7 +658,7 @@ export class IndexedDbPersistence implements Persistence {
658
658
this . detachVisibilityHandler ( ) ;
659
659
this . detachWindowUnloadHook ( ) ;
660
660
await this . simpleDb . runTransaction (
661
- 'readwrite-idempotent ' ,
661
+ 'readwrite' ,
662
662
[ DbPrimaryClient . store , DbClientMetadata . store ] ,
663
663
txn => {
664
664
return this . releasePrimaryLeaseIfHeld ( txn ) . next ( ( ) =>
@@ -690,7 +690,7 @@ export class IndexedDbPersistence implements Persistence {
690
690
691
691
getActiveClients ( ) : Promise < ClientId [ ] > {
692
692
return this . simpleDb . runTransaction (
693
- 'readonly-idempotent ' ,
693
+ 'readonly' ,
694
694
[ DbClientMetadata . store ] ,
695
695
txn => {
696
696
return clientMetadataStore ( txn )
@@ -762,16 +762,7 @@ export class IndexedDbPersistence implements Persistence {
762
762
) : Promise < T > {
763
763
log . debug ( LOG_TAG , 'Starting transaction:' , action ) ;
764
764
765
- // TODO(schmidt-sebastian): Simplify once all transactions are idempotent.
766
- const idempotent = mode . endsWith ( 'idempotent' ) ;
767
- const readonly = mode . startsWith ( 'readonly' ) ;
768
- const simpleDbMode = readonly
769
- ? idempotent
770
- ? 'readonly-idempotent'
771
- : 'readonly'
772
- : idempotent
773
- ? 'readwrite-idempotent'
774
- : 'readwrite' ;
765
+ const simpleDbMode = mode === 'readonly' ? 'readonly' : 'readwrite' ;
775
766
776
767
let persistenceTransaction : PersistenceTransaction ;
777
768
@@ -784,10 +775,7 @@ export class IndexedDbPersistence implements Persistence {
784
775
this . listenSequence . next ( )
785
776
) ;
786
777
787
- if (
788
- mode === 'readwrite-primary' ||
789
- mode === 'readwrite-primary-idempotent'
790
- ) {
778
+ if ( mode === 'readwrite-primary' ) {
791
779
// While we merely verify that we have (or can acquire) the lease
792
780
// immediately, we wait to extend the primary lease until after
793
781
// executing transactionOperation(). This ensures that even if the
0 commit comments