mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Clarify the git command Stdin hanging problem (#26967)
This commit is contained in:
		@@ -122,21 +122,6 @@ func Init() {
 | 
			
		||||
			indexer := *globalIndexer.Load()
 | 
			
		||||
			for _, indexerData := range items {
 | 
			
		||||
				log.Trace("IndexerData Process Repo: %d", indexerData.RepoID)
 | 
			
		||||
 | 
			
		||||
				// FIXME: it seems there is a bug in `CatFileBatch` or `nio.Pipe`, which will cause the process to hang forever in rare cases
 | 
			
		||||
				/*
 | 
			
		||||
					sync.(*Cond).Wait(cond.go:70)
 | 
			
		||||
					github.com/djherbis/nio/v3.(*PipeReader).Read(sync.go:106)
 | 
			
		||||
					bufio.(*Reader).fill(bufio.go:106)
 | 
			
		||||
					bufio.(*Reader).ReadSlice(bufio.go:372)
 | 
			
		||||
					bufio.(*Reader).collectFragments(bufio.go:447)
 | 
			
		||||
					bufio.(*Reader).ReadString(bufio.go:494)
 | 
			
		||||
					code.gitea.io/gitea/modules/git.ReadBatchLine(batch_reader.go:149)
 | 
			
		||||
					code.gitea.io/gitea/modules/indexer/code.(*BleveIndexer).addUpdate(bleve.go:214)
 | 
			
		||||
					code.gitea.io/gitea/modules/indexer/code.(*BleveIndexer).Index(bleve.go:296)
 | 
			
		||||
					code.gitea.io/gitea/modules/indexer/code.(*wrappedIndexer).Index(wrapped.go:74)
 | 
			
		||||
					code.gitea.io/gitea/modules/indexer/code.index(indexer.go:105)
 | 
			
		||||
				*/
 | 
			
		||||
				if err := index(ctx, indexer, indexerData.RepoID); err != nil {
 | 
			
		||||
					unhandled = append(unhandled, indexerData)
 | 
			
		||||
					if !setting.IsInTesting {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user