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

Alpha server start issue with ludicrous mode #5601

Closed
ashish-goswami opened this issue Jun 8, 2020 · 1 comment · Fixed by #5642
Closed

Alpha server start issue with ludicrous mode #5601

ashish-goswami opened this issue Jun 8, 2020 · 1 comment · Fixed by #5642
Labels
status/accepted We accept to investigate/work on it.

Comments

@ashish-goswami
Copy link
Contributor

What version of Dgraph are you using?

master(222b35a)

Have you tried reproducing the issue with the latest release?

What is the hardware spec (RAM, OS)?

Steps to reproduce the issue (command/config used to run Dgraph).

  1. Start zero server in ludicrous mode:
dgraph zero --ludicrous_mode
  1. Start alpha server in ludicrous mode:
dgraph alpha --ludicrous_mode

Alpha node continuously prints below logs:

[Decoder]: Using assembly version of decoder
[Sentry] 2020/06/08 21:23:28 Integration installed: ContextifyFrames
[Sentry] 2020/06/08 21:23:28 Integration installed: Environment
[Sentry] 2020/06/08 21:23:28 Integration installed: Modules
[Sentry] 2020/06/08 21:23:28 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
[Sentry] 2020/06/08 21:23:28 Integration installed: ContextifyFrames
[Sentry] 2020/06/08 21:23:28 Integration installed: Environment
[Sentry] 2020/06/08 21:23:28 Integration installed: Modules
[Sentry] 2020/06/08 21:23:28 Integration installed: IgnoreErrors
I0608 21:23:28.288587   20848 config.go:100] LRU memory (--lru_mb) set to 3935.75MB, 25% of the total RAM found (15743MB)
For more information on --lru_mb please read https://dgraph.io/docs/deploy/#config
I0608 21:23:28.288946   20848 util_ee.go:126] KeyReader instantiated of type <nil>
I0608 21:23:28.430722   20848 init.go:99] 

Dgraph version   : v2.0.0-rc1-392-g222b35a1e
Dgraph SHA-256   : 2da8881ffb4fc3ada6f840d7101a1437bad2511215a4b5e6462500dd442be0f7
Commit SHA-1     : 222b35a1e
Commit timestamp : 2020-06-05 17:39:49 -0700
Branch           : master
Go version       : go1.14.1

For Dgraph official documentation, visit https://dgraph.io/docs/.
For discussions about Dgraph     , visit https://discuss.dgraph.io.
To say hi to the community       , visit https://dgraph.slack.com.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.


I0608 21:23:28.430746   20848 run.go:640] x.Config: {PortOffset:100 QueryEdgeLimit:1000000 NormalizeNodeLimit:10000 PollInterval:1s}
I0608 21:23:28.430786   20848 run.go:641] x.WorkerConfig: {ExportPath:export NumPendingProposals:256 Tracing:0.01 MyAddr: ZeroAddr:[localhost:5180] RaftId:0 WhiteListedIPRanges:[] MaxRetries:-1 StrictMutations:false AclEnabled:false AbortOlderThan:5m0s SnapshotAfter:10000 ProposedGroupId:0 StartTime:2020-06-08 21:23:28.15123759 +0530 IST m=+0.007200998 LudicrousMode:true EncryptionKey:**** LogRequest:0}
I0608 21:23:28.430812   20848 run.go:642] worker.Config: {PostingDir:p BadgerTables:mmap BadgerVlog:mmap BadgerCompressionLevel:3 WALDir:w MutationsMode:0 AuthToken: AllottedMemory:3935.75 HmacSecret:**** AccessJwtTtl:0s RefreshJwtTtl:0s AclRefreshInterval:0s}
I0608 21:23:28.430909   20848 server_state.go:74] Setting Badger Compression Level: 3
I0608 21:23:28.430914   20848 server_state.go:83] Setting Badger table load option: mmap
I0608 21:23:28.430917   20848 server_state.go:95] Setting Badger value log load option: mmap
I0608 21:23:28.430922   20848 server_state.go:140] Opening write-ahead log BadgerDB with options: {Dir:w ValueDir:w SyncWrites:false TableLoadingMode:1 ValueLogLoadingMode:2 NumVersionsToKeep:1 ReadOnly:false Truncate:true Logger:0x2b6df70 Compression:2 InMemory:false MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:1048576 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 KeepL0InMemory:true MaxCacheSize:10485760 MaxBfCacheSize:0 LoadBloomsOnOpen:false NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741823 ValueLogMaxEntries:10000 NumCompactors:2 CompactL0OnClose:true LogRotatesToFlush:2 ZSTDCompressionLevel:3 VerifyValueChecksum:false EncryptionKey:[] EncryptionKeyRotationDuration:240h0m0s BypassLockGuard:false ChecksumVerificationMode:0 KeepBlockIndicesInCache:false KeepBlocksInCache:false managedTxns:false maxBatchCount:0 maxBatchSize:0}
I0608 21:23:28.512097   20848 log.go:34] All 0 tables opened in 0s
I0608 21:23:28.514541   20848 server_state.go:74] Setting Badger Compression Level: 3
I0608 21:23:28.514601   20848 server_state.go:83] Setting Badger table load option: mmap
I0608 21:23:28.514616   20848 server_state.go:95] Setting Badger value log load option: mmap
I0608 21:23:28.514635   20848 server_state.go:164] Opening postings BadgerDB with options: {Dir:p ValueDir:p SyncWrites:false TableLoadingMode:2 ValueLogLoadingMode:2 NumVersionsToKeep:2147483647 ReadOnly:false Truncate:true Logger:0x2b6df70 Compression:2 InMemory:false MaxTableSize:67108864 LevelSizeMultiplier:10 MaxLevels:7 ValueThreshold:1024 NumMemtables:5 BlockSize:4096 BloomFalsePositive:0.01 KeepL0InMemory:true MaxCacheSize:1073741824 MaxBfCacheSize:524288000 LoadBloomsOnOpen:false NumLevelZeroTables:5 NumLevelZeroTablesStall:10 LevelOneSize:268435456 ValueLogFileSize:1073741823 ValueLogMaxEntries:1000000 NumCompactors:2 CompactL0OnClose:true LogRotatesToFlush:2 ZSTDCompressionLevel:3 VerifyValueChecksum:false EncryptionKey:[] EncryptionKeyRotationDuration:240h0m0s BypassLockGuard:false ChecksumVerificationMode:0 KeepBlockIndicesInCache:true KeepBlocksInCache:true managedTxns:false maxBatchCount:0 maxBatchSize:0}
I0608 21:23:28.563368   20848 log.go:34] All 0 tables opened in 0s
I0608 21:23:28.566971   20848 groups.go:107] Current Raft Id: 0x0
I0608 21:23:28.567492   20848 worker.go:97] Worker listening at address: [::]:7180
I0608 21:23:28.570069   20848 run.go:513] Bringing up GraphQL HTTP API at 0.0.0.0:8180/graphql
I0608 21:23:28.570124   20848 run.go:514] Bringing up GraphQL HTTP admin API at 0.0.0.0:8180/admin
I0608 21:23:28.570209   20848 run.go:546] gRPC server started.  Listening on port 9180
I0608 21:23:28.570256   20848 run.go:547] HTTP server started.  Listening on port 8180
I0608 21:23:28.668009   20848 pool.go:160] CONNECTING to localhost:5180
I0608 21:23:30.455848   20848 groups.go:135] Connected to group zero. Assigned group: 1
I0608 21:23:30.455862   20848 groups.go:137] Raft Id after connection to Zero: 0x1
I0608 21:23:30.455984   20848 pool.go:160] CONNECTING to localhost:7180
I0608 21:23:30.456011   20848 draft.go:210] Node ID: 0x1 with GroupID: 1
I0608 21:23:30.456045   20848 node.go:148] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc000347680 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x2b6df70 DisableProposalForwarding:false}
I0608 21:23:30.456127   20848 node.go:326] Group 1 found 0 entries
I0608 21:23:30.456140   20848 draft.go:1606] New Node for group: 1
I0608 21:23:30.456167   20848 log.go:34] 1 became follower at term 0
I0608 21:23:30.456200   20848 log.go:34] newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
I0608 21:23:30.456206   20848 log.go:34] 1 became follower at term 1
I0608 21:23:30.456246   20848 draft.go:160] Operation started with id: opRollup
I0608 21:23:30.456259   20848 groups.go:155] Server is ready
I0608 21:23:30.456291   20848 groups.go:782] Got address of a Zero leader: localhost:5180
I0608 21:23:30.456316   20848 draft.go:1001] Found Raft progress: 0
I0608 21:23:30.456420   20848 groups.go:796] Starting a new membership stream receive from localhost:5180.
I0608 21:23:30.456464   20848 node.go:185] Setting conf state to nodes:1 
I0608 21:23:30.456545   20848 log.go:34] 1 is starting a new election at term 1
I0608 21:23:30.456551   20848 log.go:34] 1 became pre-candidate at term 1
I0608 21:23:30.456554   20848 log.go:34] 1 received MsgPreVoteResp from 1 at term 1
I0608 21:23:30.456564   20848 log.go:34] 1 became candidate at term 2
I0608 21:23:30.456570   20848 log.go:34] 1 received MsgVoteResp from 1 at term 2
I0608 21:23:30.456580   20848 log.go:34] 1 became leader at term 2
I0608 21:23:30.456588   20848 log.go:34] raft.node: 1 elected leader 1 at term 2
I0608 21:23:30.456939   20848 groups.go:813] Received first state update from Zero: counter:3 groups:<key:1 value:<members:<key:1 value:<id:1 group_id:1 addr:"localhost:7180" > > > > zeros:<key:1 value:<id:1 addr:"localhost:5180" leader:true > > maxRaftId:1 
I0608 21:23:31.456754   20848 groups.go:864] Leader idx=0x1 of group=1 is connecting to Zero for txn updates
I0608 21:23:31.457134   20848 groups.go:873] Got Zero leader: localhost:5180
I0608 21:23:31.462658   20848 groups.go:493] Serving tablet for: dgraph.type
I0608 21:23:31.463601   20848 draft.go:160] Operation started with id: opIndexing
I0608 21:23:31.463749   20848 index.go:856] Deleting index for attr dgraph.type and tokenizers []
I0608 21:23:31.463774   20848 index.go:870] Deleting index for attr dgraph.type and tokenizers [exact]
I0608 21:23:31.463804   20848 log.go:34] DropPrefix Called
I0608 21:23:31.463832   20848 log.go:34] Writes flushed. Stopping compactions now...
I0608 21:23:31.463850   20848 draft.go:115] Operation completed with id: opRollup
I0608 21:23:31.467991   20848 groups.go:493] Serving tablet for: dgraph.graphql.schema
I0608 21:23:31.468907   20848 log.go:34] DropPrefix done
I0608 21:23:31.468975   20848 log.go:34] Resuming writes
I0608 21:23:31.468995   20848 log.go:34] DropPrefix Called
I0608 21:23:31.469023   20848 log.go:34] Writes flushed. Stopping compactions now...
I0608 21:23:31.473554   20848 log.go:34] DropPrefix done
I0608 21:23:31.473612   20848 log.go:34] Resuming writes
I0608 21:23:31.473794   20848 log.go:34] DropPrefix Called
I0608 21:23:31.473838   20848 log.go:34] Writes flushed. Stopping compactions now...
I0608 21:23:31.479775   20848 log.go:34] DropPrefix done
I0608 21:23:31.479936   20848 log.go:34] Resuming writes
I0608 21:23:31.479992   20848 log.go:34] DropPrefix Called
I0608 21:23:31.481969   20848 log.go:34] Writes flushed. Stopping compactions now...
I0608 21:23:31.518288   20848 log.go:34] DropPrefix done
I0608 21:23:31.518324   20848 log.go:34] Resuming writes
I0608 21:23:31.538962   20848 log.go:34] All 0 tables opened in 0s
I0608 21:23:31.540463   20848 log.go:34] Rebuilding index for predicate dgraph.type (1/2): Sent 0 keys
I0608 21:23:31.540516   20848 log.go:34] Rebuilding index for predicate dgraph.type (2/2): Sent 0 keys
I0608 21:23:31.540609   20848 log.go:34] Got compaction priority: {level:0 score:1.73 dropPrefix:[]}
I0608 21:23:31.541736   20848 index.go:901] Rebuilding index for attr dgraph.type and tokenizers [exact]
I0608 21:23:31.542838   20848 groups.go:493] Serving tablet for: dgraph.graphql.xid
I0608 21:23:31.545902   20848 log.go:34] All 0 tables opened in 0s
I0608 21:23:31.547302   20848 log.go:34] Rebuilding index for predicate dgraph.type (1/2): Sent 0 keys
I0608 21:23:31.547343   20848 log.go:34] Rebuilding index for predicate dgraph.type (2/2): Sent 0 keys
I0608 21:23:31.547404   20848 log.go:34] Got compaction priority: {level:0 score:1.73 dropPrefix:[]}
I0608 21:23:31.548425   20848 mutation.go:186] Done schema update predicate:"dgraph.type" value_type:STRING directive:INDEX tokenizer:"exact" list:true 
I0608 21:23:31.548527   20848 draft.go:115] Operation completed with id: opIndexing
E0608 21:23:31.548492   20848 draft.go:662] Applying proposal. Error: operation opIndexing is already running. Proposal: "mutations:<group_id:1 start_ts:2 schema:<predicate:\"dgraph.graphql.schema\" value_type:STRING > > key:\"01-15274376885199458510\" index:9 ".
I0608 21:23:31.549153   20848 draft.go:160] Operation started with id: opIndexing
I0608 21:23:31.549176   20848 index.go:856] Deleting index for attr dgraph.graphql.xid and tokenizers []
I0608 21:23:31.549180   20848 index.go:870] Deleting index for attr dgraph.graphql.xid and tokenizers [exact]
I0608 21:23:31.549185   20848 log.go:34] DropPrefix Called
I0608 21:23:31.549190   20848 log.go:34] Writes flushed. Stopping compactions now...
E0608 21:23:31.550519   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
I0608 21:23:31.563813   20848 log.go:34] Got compaction priority: {level:0 score:1.74 dropPrefix:[0 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 2]}
I0608 21:23:31.563829   20848 log.go:34] Running for level: 0
I0608 21:23:31.567185   20848 log.go:34] LOG Compact 0->1, del 1 tables, add 1 tables, took 3.344863ms
I0608 21:23:31.567200   20848 log.go:34] Compaction for level: 0 DONE
I0608 21:23:31.567208   20848 log.go:34] DropPrefix done
I0608 21:23:31.567215   20848 log.go:34] Resuming writes
I0608 21:23:31.567219   20848 log.go:34] DropPrefix Called
I0608 21:23:31.567226   20848 log.go:34] Writes flushed. Stopping compactions now...
I0608 21:23:31.571470   20848 log.go:34] LOG Compact 1->1, del 1 tables, add 1 tables, took 3.285048ms
I0608 21:23:31.571480   20848 log.go:34] DropPrefix done
I0608 21:23:31.571484   20848 log.go:34] Resuming writes
I0608 21:23:31.571513   20848 log.go:34] DropPrefix Called
I0608 21:23:31.571519   20848 log.go:34] Writes flushed. Stopping compactions now...
I0608 21:23:31.572424   20848 log.go:34] DropPrefix done
I0608 21:23:31.572434   20848 log.go:34] Resuming writes
I0608 21:23:31.572438   20848 log.go:34] DropPrefix Called
I0608 21:23:31.572443   20848 log.go:34] Writes flushed. Stopping compactions now...
I0608 21:23:31.589823   20848 log.go:34] LOG Compact 1->1, del 1 tables, add 1 tables, took 16.154075ms
I0608 21:23:31.589838   20848 log.go:34] DropPrefix done
I0608 21:23:31.589843   20848 log.go:34] Resuming writes
I0608 21:23:31.589881   20848 index.go:901] Rebuilding index for attr dgraph.graphql.xid and tokenizers [exact]
I0608 21:23:31.598428   20848 log.go:34] All 0 tables opened in 0s
I0608 21:23:31.600089   20848 log.go:34] Rebuilding index for predicate dgraph.graphql.xid (1/2): Sent 0 keys
I0608 21:23:31.600150   20848 log.go:34] Rebuilding index for predicate dgraph.graphql.xid (2/2): Sent 0 keys
I0608 21:23:31.600214   20848 log.go:34] Got compaction priority: {level:0 score:1.73 dropPrefix:[]}
I0608 21:23:31.601244   20848 mutation.go:186] Done schema update predicate:"dgraph.graphql.xid" value_type:STRING directive:INDEX tokenizer:"exact" upsert:true 
I0608 21:23:31.601277   20848 draft.go:115] Operation completed with id: opIndexing
E0608 21:23:31.650962   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:31.751583   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:31.852169   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:31.952609   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.053148   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.153848   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.254504   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.355054   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.455605   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.556174   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.656580   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.756926   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.857276   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:32.957600   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.058079   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.158611   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.259102   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.359702   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.460116   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.560744   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
I0608 21:23:33.577168   20848 admin.go:652] Error reading GraphQL schema: Dgraph execution failed because Can't store predicate `dgraph.graphql.schema` as it is prefixed with `dgraph.` which is reserved as the namespace for dgraph's internal types/predicates..
E0608 21:23:33.661288   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.761835   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.862226   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:33.962615   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.063194   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.163666   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.264090   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.364674   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.465124   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.565668   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.666185   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.766703   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.867136   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:34.967697   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.068241   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.168766   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.269349   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.369891   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.470284   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.570873   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.671298   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.771918   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.872551   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:35.973234   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.073743   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.174186   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.274751   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.375414   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.476096   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.576765   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.677411   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.778053   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.878730   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:36.979135   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.079812   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.180433   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.281033   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.381572   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.482264   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.582797   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.683143   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.783764   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.884702   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:37.985359   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.085906   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.186540   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.287394   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.387967   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.488493   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
I0608 21:23:38.582900   20848 admin.go:652] Error reading GraphQL schema: Dgraph execution failed because Can't store predicate `dgraph.graphql.schema` as it is prefixed with `dgraph.` which is reserved as the namespace for dgraph's internal types/predicates..
E0608 21:23:38.589176   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.689912   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.790494   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.891009   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:38.991305   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.092200   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.192545   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.293169   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.393626   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.494176   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.594688   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.695259   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.795866   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.896442   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:39.997099   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.097721   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.198336   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.299006   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.399659   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.500367   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.601161   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.701652   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.802041   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:40.902703   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.003000   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.103751   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.204238   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.304768   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.405500   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.506142   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
I0608 21:23:41.548755   20848 draft.go:160] Operation started with id: opRollup
E0608 21:23:41.606763   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.707594   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.808542   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:41.909164   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.009799   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.110344   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.211187   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.311785   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.412310   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.512981   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.613504   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.714168   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:42.814764   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
^CI0608 21:23:42.846558   20848 run.go:683] Caught Ctrl-C. Terminating now (this may take a few seconds)...
E0608 21:23:42.846779   20848 run.go:396] GRPC listener canceled: accept tcp [::]:9180: use of closed network connection
E0608 21:23:42.846924   20848 run.go:415] Stopped taking more http(s) requests. Err: accept tcp [::]:8180: use of closed network connection
I0608 21:23:42.847026   20848 run.go:706] GRPC and HTTP stopped.
E0608 21:23:42.915157   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
^CI0608 21:23:43.001401   20848 run.go:683] Caught Ctrl-C. Terminating now (this may take a few seconds)...
E0608 21:23:43.015696   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
E0608 21:23:43.116288   20848 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
^CI0608 21:23:43.185957   20848 run.go:683] Caught Ctrl-C. Terminating now (this may take a few seconds)...
I0608 21:23:43.186019   20848 run.go:685] Signaled thrice. Aborting!

Expected behaviour and actual result.

@lgalatin lgalatin added the status/accepted We accept to investigate/work on it. label Jun 9, 2020
@abhimanyusinghgaur
Copy link
Contributor

I looked into as to why this started happening.

So, when I use master at 28617a6, I get the following error in ludicrous_mode:

E0610 10:40:48.110377   55302 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql

This error keeps occurring for a while, and after that it goes away (within a minute), and alpha is able to boot up properly with the initial node for GraphQL schema. I had checked history till commit 4b264e4, and the same behaviour was there.

Now, when I use master one commit after the above commit at aef7072, I get following kinds of error in ludicrous_mode:

E0610 10:40:48.210518   55302 groups.go:253] Error while proposing initial schema: Schema does not contain a matching predicate for field dgraph.graphql.schema in type dgraph.graphql
I0610 10:40:48.307057   55302 admin.go:652] Error reading GraphQL schema: Dgraph execution failed because Can't store predicate `dgraph.graphql.schema` as it is prefixed with `dgraph.` which is reserved as the namespace for dgraph's internal types/predicates..

These errors keep repeating, with the first error occurring more often than the second. I tried waiting for some time, but these errors never went away. This causes alpha to not be able to boot up.

Now, the reason why this behaviour is happening with the second commit and not the first one, is because the second commit restricts the mutation for predicates starting with dgraph. if they don't already exist in schema. So, only if the predicate dgraph.graphql.schema exists in the dgraph schema, then the initial upsert for GraphQL schema would work correctly. But, as indicated by the first error, the initial proposal for that predicate has failed, and so the second error also occurs.
And, these two errors combined are somehow not letting alpha boot up properly, and resulting in infinite (not sure if it is infinite, haven't tried running it for a long time) error loop.

And, I think the reason why it doesn't happen with the first commit is although the full initial schema is not there yet, but because of no restriction on the mutations on predicates starting with dgraph., the initial upsert for GraphQL schema node is able to succeed, and somehow because of that the initial proposal also succeeds, and the error stops happening.

In order to solve it, I guess the only way is to make sure that the initial proposal for internal types and predicates gets applied properly, irrespective of the ludicrous_mode constraints, as indicated by the first error.

So, in a way the commit aef7072 breaks ludicrous_mode, but the issue lies somewhere else.

ashish-goswami added a commit that referenced this issue Jul 8, 2020
Fixes: #5601
Fixes: DGRAPH-1669

Currently we are unable to start alpha server in ludicrous mode, because of reasons explained
below.

Things we do at alpha start:

At start we insert dgraph.type, dgraph.graphql.schema and dgraph.graphql.xid predicates as
our initial schema.
We also insert dgraph.graphql type(having predicates dgraph.graphql.schema and
dgraph.graphql.xid) as initial types.
We also upsert data related to graphql schema(which results in upserts for predicates
dgraph.graphql.schema and dgraph.graphql.xid).
While inserting types we verify that predicates used in the types should either already be present
in schema or should be part of same mutation where we are trying to insert this type.

In ludicrous mode we mark any proposal done without error as soon as it is retrieved as part of commited entries, as opposed to after applying proposal (this is done in normal mode).

Events which led to alpha getting stuck:

We propose schema mutation for dgraph.type, which is marked as done immediately. This
proposal is still getting applied.
Since we marked above proposal done without error, we propose next schema mutation for
dgraph.graphql.schema, which again is marked done without error. But applying of this proposal
fails as indexing was already in progress for dgraph.type. But we never retry this schema
mutation.
Next we propose dgraph.graphql.xid, which is applied successfully(indexing is done until now
for dgraph.type).
When we insert dgraph.graphql type, verifyTypes() fails, because it never finds
dgraphq.graphql.schema predicate.
Proposed solution:
Assumption that proposal is never failed while applying, hence it should be marked as done without
error immediately, should hold only for data mutations and not schema mutations.

This PR checks if proposal is data mutation(having edges > 0), while marking it done
immediately. This leads to retrying of schema proposal if they fail once because indexing is already
in progress.

Note: We didn't observe this before commit(aef7072), because predicate dgraph.graphql.schema was getting inserted via graphql upserts(#3 of start steps). Now after
commit(aef7072) we cannot insert data for predicates starting with dgraph. prefix unless those are already present.
ashish-goswami added a commit that referenced this issue Jul 9, 2020
Fixes: #5601
Fixes: DGRAPH-1669

Currently we are unable to start alpha server in ludicrous mode, because of reasons explained
below.

Things we do at alpha start:

At start we insert dgraph.type, dgraph.graphql.schema and dgraph.graphql.xid predicates as
our initial schema.
We also insert dgraph.graphql type(having predicates dgraph.graphql.schema and
dgraph.graphql.xid) as initial types.
We also upsert data related to graphql schema(which results in upserts for predicates
dgraph.graphql.schema and dgraph.graphql.xid).
While inserting types we verify that predicates used in the types should either already be present
in schema or should be part of same mutation where we are trying to insert this type.

In ludicrous mode we mark any proposal done without error as soon as it is retrieved as part of commited entries, as opposed to after applying proposal (this is done in normal mode).

Events which led to alpha getting stuck:

We propose schema mutation for dgraph.type, which is marked as done immediately. This
proposal is still getting applied.
Since we marked above proposal done without error, we propose next schema mutation for
dgraph.graphql.schema, which again is marked done without error. But applying of this proposal
fails as indexing was already in progress for dgraph.type. But we never retry this schema
mutation.
Next we propose dgraph.graphql.xid, which is applied successfully(indexing is done until now
for dgraph.type).
When we insert dgraph.graphql type, verifyTypes() fails, because it never finds
dgraphq.graphql.schema predicate.
Proposed solution:
Assumption that proposal is never failed while applying, hence it should be marked as done without
error immediately, should hold only for data mutations and not schema mutations.

This PR checks if proposal is data mutation(having edges > 0), while marking it done
immediately. This leads to retrying of schema proposal if they fail once because indexing is already
in progress.

Note: We didn't observe this before commit(aef7072), because predicate dgraph.graphql.schema was getting inserted via graphql upserts(#3 of start steps). Now after
commit(aef7072) we cannot insert data for predicates starting with dgraph. prefix unless those are already present.

(cherry picked from commit d3c16be)
ashish-goswami added a commit that referenced this issue Jul 10, 2020
Fixes: #5601
Fixes: DGRAPH-1669

Currently we are unable to start alpha server in ludicrous mode, because of reasons explained
below.

Things we do at alpha start:

At start we insert dgraph.type, dgraph.graphql.schema and dgraph.graphql.xid predicates as
our initial schema.
We also insert dgraph.graphql type(having predicates dgraph.graphql.schema and
dgraph.graphql.xid) as initial types.
We also upsert data related to graphql schema(which results in upserts for predicates
dgraph.graphql.schema and dgraph.graphql.xid).
While inserting types we verify that predicates used in the types should either already be present
in schema or should be part of same mutation where we are trying to insert this type.

In ludicrous mode we mark any proposal done without error as soon as it is retrieved as part of commited entries, as opposed to after applying proposal (this is done in normal mode).

Events which led to alpha getting stuck:

We propose schema mutation for dgraph.type, which is marked as done immediately. This
proposal is still getting applied.
Since we marked above proposal done without error, we propose next schema mutation for
dgraph.graphql.schema, which again is marked done without error. But applying of this proposal
fails as indexing was already in progress for dgraph.type. But we never retry this schema
mutation.
Next we propose dgraph.graphql.xid, which is applied successfully(indexing is done until now
for dgraph.type).
When we insert dgraph.graphql type, verifyTypes() fails, because it never finds
dgraphq.graphql.schema predicate.
Proposed solution:
Assumption that proposal is never failed while applying, hence it should be marked as done without
error immediately, should hold only for data mutations and not schema mutations.

This PR checks if proposal is data mutation(having edges > 0), while marking it done
immediately. This leads to retrying of schema proposal if they fail once because indexing is already
in progress.

Note: We didn't observe this before commit(aef7072), because predicate dgraph.graphql.schema was getting inserted via graphql upserts(#3 of start steps). Now after
commit(aef7072) we cannot insert data for predicates starting with dgraph. prefix unless those are already present.

(cherry picked from commit d3c16be)
arijitAD pushed a commit that referenced this issue Jul 14, 2020
Fixes: #5601
Fixes: DGRAPH-1669

Currently we are unable to start alpha server in ludicrous mode, because of reasons explained
below.

Things we do at alpha start:

At start we insert dgraph.type, dgraph.graphql.schema and dgraph.graphql.xid predicates as
our initial schema.
We also insert dgraph.graphql type(having predicates dgraph.graphql.schema and
dgraph.graphql.xid) as initial types.
We also upsert data related to graphql schema(which results in upserts for predicates
dgraph.graphql.schema and dgraph.graphql.xid).
While inserting types we verify that predicates used in the types should either already be present
in schema or should be part of same mutation where we are trying to insert this type.

In ludicrous mode we mark any proposal done without error as soon as it is retrieved as part of commited entries, as opposed to after applying proposal (this is done in normal mode).

Events which led to alpha getting stuck:

We propose schema mutation for dgraph.type, which is marked as done immediately. This
proposal is still getting applied.
Since we marked above proposal done without error, we propose next schema mutation for
dgraph.graphql.schema, which again is marked done without error. But applying of this proposal
fails as indexing was already in progress for dgraph.type. But we never retry this schema
mutation.
Next we propose dgraph.graphql.xid, which is applied successfully(indexing is done until now
for dgraph.type).
When we insert dgraph.graphql type, verifyTypes() fails, because it never finds
dgraphq.graphql.schema predicate.
Proposed solution:
Assumption that proposal is never failed while applying, hence it should be marked as done without
error immediately, should hold only for data mutations and not schema mutations.

This PR checks if proposal is data mutation(having edges > 0), while marking it done
immediately. This leads to retrying of schema proposal if they fail once because indexing is already
in progress.

Note: We didn't observe this before commit(aef7072), because predicate dgraph.graphql.schema was getting inserted via graphql upserts(#3 of start steps). Now after
commit(aef7072) we cannot insert data for predicates starting with dgraph. prefix unless those are already present.
dna2github pushed a commit to dna2fork/dgraph that referenced this issue Jul 18, 2020
Fixes: dgraph-io#5601
Fixes: DGRAPH-1669

Currently we are unable to start alpha server in ludicrous mode, because of reasons explained
below.

Things we do at alpha start:

At start we insert dgraph.type, dgraph.graphql.schema and dgraph.graphql.xid predicates as
our initial schema.
We also insert dgraph.graphql type(having predicates dgraph.graphql.schema and
dgraph.graphql.xid) as initial types.
We also upsert data related to graphql schema(which results in upserts for predicates
dgraph.graphql.schema and dgraph.graphql.xid).
While inserting types we verify that predicates used in the types should either already be present
in schema or should be part of same mutation where we are trying to insert this type.

In ludicrous mode we mark any proposal done without error as soon as it is retrieved as part of commited entries, as opposed to after applying proposal (this is done in normal mode).

Events which led to alpha getting stuck:

We propose schema mutation for dgraph.type, which is marked as done immediately. This
proposal is still getting applied.
Since we marked above proposal done without error, we propose next schema mutation for
dgraph.graphql.schema, which again is marked done without error. But applying of this proposal
fails as indexing was already in progress for dgraph.type. But we never retry this schema
mutation.
Next we propose dgraph.graphql.xid, which is applied successfully(indexing is done until now
for dgraph.type).
When we insert dgraph.graphql type, verifyTypes() fails, because it never finds
dgraphq.graphql.schema predicate.
Proposed solution:
Assumption that proposal is never failed while applying, hence it should be marked as done without
error immediately, should hold only for data mutations and not schema mutations.

This PR checks if proposal is data mutation(having edges > 0), while marking it done
immediately. This leads to retrying of schema proposal if they fail once because indexing is already
in progress.

Note: We didn't observe this before commit(aef7072), because predicate dgraph.graphql.schema was getting inserted via graphql upserts(dgraph-io#3 of start steps). Now after
commit(aef7072) we cannot insert data for predicates starting with dgraph. prefix unless those are already present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/accepted We accept to investigate/work on it.
Development

Successfully merging a pull request may close this issue.

3 participants