Removes the use of O_SYNC on logs #1656
With O_SYNC on open of log files, on systems with slow filesystem random write performance, there is random activity startup time.
This commit is contained in:
		
							parent
							
								
									6921bcd67d
								
							
						
					
					
						commit
						f8ef93bd21
					
				@ -149,8 +149,7 @@ def open_log_file(activity):
 | 
				
			|||||||
    while True:
 | 
					    while True:
 | 
				
			||||||
        path = env.get_logs_path('%s-%s.log' % (activity.get_bundle_id(), i))
 | 
					        path = env.get_logs_path('%s-%s.log' % (activity.get_bundle_id(), i))
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            fd = os.open(path, os.O_EXCL | os.O_CREAT \
 | 
					            fd = os.open(path, os.O_EXCL | os.O_CREAT | os.O_WRONLY, 0644)
 | 
				
			||||||
                             | os.O_SYNC | os.O_WRONLY, 0644)
 | 
					 | 
				
			||||||
            f = os.fdopen(fd, 'w', 0)
 | 
					            f = os.fdopen(fd, 'w', 0)
 | 
				
			||||||
            return (path, f)
 | 
					            return (path, f)
 | 
				
			||||||
        except OSError, e:
 | 
					        except OSError, e:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user